Search Results for

    Show / Hide Table of Contents
    View Source

    Class UrlInfo

    Represents infos for a URL.

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

    Constructors

    View Source

    UrlInfo(String, Boolean, String)

    Initializes a new instance of the UrlInfo class.

    Declaration
    public UrlInfo(string text, bool isUrl, string culture)
    Parameters
    Type Name Description
    System.String text
    System.Boolean isUrl
    System.String culture

    Properties

    View Source

    Culture

    Gets the culture.

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

    IsUrl

    Gets a value indicating whether the URL is a true URL.

    Declaration
    [DataMember(Name = "isUrl")]
    public bool IsUrl { get; }
    Property Value
    Type Description
    System.Boolean
    Remarks

    Otherwise, it is a message.

    View Source

    Text

    Gets the text, which is either the URL, or a message.

    Declaration
    [DataMember(Name = "text")]
    public string Text { get; }
    Property Value
    Type Description
    System.String

    Methods

    View Source

    Equals(Object)

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    System.Object obj
    Returns
    Type Description
    System.Boolean
    View Source

    Equals(UrlInfo)

    Checks equality

    Declaration
    public bool Equals(UrlInfo other)
    Parameters
    Type Name Description
    UrlInfo other
    Returns
    Type Description
    System.Boolean
    Remarks

    Compare both culture and Text as invariant strings since URLs are not case sensitive, nor are culture names within Umbraco

    View Source

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    System.Int32
    View Source

    Message(String, String)

    Creates a UrlInfo instance representing a message.

    Declaration
    public static UrlInfo Message(string text, string culture = null)
    Parameters
    Type Name Description
    System.String text
    System.String culture
    Returns
    Type Description
    UrlInfo
    View Source

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    System.String
    View Source

    Url(String, String)

    Creates a UrlInfo instance representing a true URL.

    Declaration
    public static UrlInfo Url(string text, string culture = null)
    Parameters
    Type Name Description
    System.String text
    System.String culture
    Returns
    Type Description
    UrlInfo

    Operators

    View Source

    Equality(UrlInfo, UrlInfo)

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

    Inequality(UrlInfo, UrlInfo)

    Declaration
    public static bool operator !=(UrlInfo left, UrlInfo right)
    Parameters
    Type Name Description
    UrlInfo left
    UrlInfo right
    Returns
    Type Description
    System.Boolean
    • Improve this Doc
    • View Source
    In This Article
    • Constructors
      • UrlInfo(String, Boolean, String)
    • Properties
      • Culture
      • IsUrl
      • Text
    • Methods
      • Equals(Object)
      • Equals(UrlInfo)
      • GetHashCode()
      • Message(String, String)
      • ToString()
      • Url(String, String)
    • Operators
      • Equality(UrlInfo, UrlInfo)
      • Inequality(UrlInfo, UrlInfo)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX