Search Results for

    Show / Hide Table of Contents
    View Source

    Class UrlInfo

    Represents infos for a URL.

    Inheritance
    object
    Namespace: Umbraco.Cms.Core.Routing
    Assembly: Umbraco.Core.dll
    Syntax
    [DataContract(Name = "urlInfo", Namespace = "")]
    public class UrlInfo

    Constructors

    View Source

    UrlInfo(string, string, string?)

    Initializes a new instance of the UrlInfo class as a "message only" - that is, not an actual URL.

    Declaration
    public UrlInfo(string message, string provider, string? culture = null)
    Parameters
    Type Name Description
    string message
    string provider
    string culture
    View Source

    UrlInfo(Uri, string, string?, string?, bool)

    Initializes a new instance of the UrlInfo class.

    Declaration
    public UrlInfo(Uri url, string provider, string? culture, string? message = null, bool isExternal = false)
    Parameters
    Type Name Description
    Uri url
    string provider
    string culture
    string message
    bool isExternal

    Properties

    View Source

    Culture

    Gets the culture.

    Declaration
    [DataMember(Name = "culture")]
    public string? Culture { get; }
    Property Value
    Type Description
    string
    View Source

    IsExternal

    Gets whether this is considered an external or a local URL (remote or local host).

    Declaration
    [DataMember(Name = "isExternal")]
    public bool IsExternal { get; }
    Property Value
    Type Description
    bool
    View Source

    Message

    Gets the message.

    Declaration
    [DataMember(Name = "message")]
    public string? Message { get; }
    Property Value
    Type Description
    string
    View Source

    Provider

    Declaration
    public string Provider { get; }
    Property Value
    Type Description
    string
    View Source

    Url

    Gets the URL.

    Declaration
    [DataMember(Name = "url")]
    public Uri? Url { get; }
    Property Value
    Type Description
    Uri

    Methods

    View Source

    AsMessage(string, string, string?)

    Declaration
    public static UrlInfo AsMessage(string message, string provider, string? culture = null)
    Parameters
    Type Name Description
    string message
    string provider
    string culture
    Returns
    Type Description
    UrlInfo
    View Source

    AsUrl(string, string, string?, bool)

    Declaration
    public static UrlInfo AsUrl(string url, string provider, string? culture = null, bool isExternal = false)
    Parameters
    Type Name Description
    string url
    string provider
    string culture
    bool isExternal
    Returns
    Type Description
    UrlInfo
    View Source

    Equals(object?)

    Determines whether the specified object is equal to the current object.

    Declaration
    public override bool Equals(object? obj)
    Parameters
    Type Name Description
    object obj

    The object to compare with the current object.

    Returns
    Type Description
    bool

    true if the specified object is equal to the current object; otherwise, false.

    View Source

    Equals(UrlInfo?)

    Checks equality

    Declaration
    public bool Equals(UrlInfo? other)
    Parameters
    Type Name Description
    UrlInfo other
    Returns
    Type Description
    bool
    View Source

    FromUri(Uri, string, string?, bool)

    Declaration
    public static UrlInfo FromUri(Uri uri, string provider, string? culture = null, bool isExternal = false)
    Parameters
    Type Name Description
    Uri uri
    string provider
    string culture
    bool isExternal
    Returns
    Type Description
    UrlInfo
    View Source

    GetHashCode()

    Serves as the default hash function.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    A hash code for the current object.

    View Source

    ToString()

    Returns a string that represents the current object.

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    A string that represents the current object.

    Operators

    View Source

    operator ==(UrlInfo, UrlInfo)

    Declaration
    public static bool operator ==(UrlInfo left, UrlInfo right)
    Parameters
    Type Name Description
    UrlInfo left
    UrlInfo right
    Returns
    Type Description
    bool
    View Source

    operator !=(UrlInfo, UrlInfo)

    Declaration
    public static bool operator !=(UrlInfo left, UrlInfo right)
    Parameters
    Type Name Description
    UrlInfo left
    UrlInfo right
    Returns
    Type Description
    bool
    • Edit this page
    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX