View Source
Class UrlInfo
Represents infos for a URL.
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
Declaration
[DataMember(Name = "culture")]
public string? Culture { get; }
Property Value
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
View Source
Message
Declaration
[DataMember(Name = "message")]
public string? Message { get; }
Property Value
View Source
Provider
Declaration
public string Provider { get; }
Property Value
View Source
Url
Declaration
[DataMember(Name = "url")]
public Uri? Url { get; }
Property Value
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
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
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?)
Declaration
public bool Equals(UrlInfo? other)
Parameters
| Type |
Name |
Description |
| UrlInfo |
other |
|
Returns
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
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
Returns
View Source
operator !=(UrlInfo, UrlInfo)
Declaration
public static bool operator !=(UrlInfo left, UrlInfo right)
Parameters
Returns