Class GuidUdi
Represents a guid-based entity identifier.
Namespace: Umbraco.Core
Assembly: Umbraco.Core.dll
Syntax
[TypeConverter(typeof(UdiTypeConverter))]
public class GuidUdi : Udi, IComparable<Udi>
Constructors
View SourceGuidUdi(String, Guid)
Initializes a new instance of the GuidUdi class with an entity type and a guid.
Declaration
public GuidUdi(string entityType, Guid guid)
Parameters
Type | Name | Description |
---|---|---|
System.String | entityType | The entity type part of the udi. |
System.Guid | guid | The guid part of the udi. |
GuidUdi(Uri)
Initializes a new instance of the GuidUdi class with an uri value.
Declaration
public GuidUdi(Uri uriValue)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | uriValue | The uri value of the udi. |
Properties
View SourceGuid
The guid part of the identifier.
Declaration
public Guid Guid { get; }
Property Value
Type | Description |
---|---|
System.Guid |
IsRoot
Gets a value indicating whether this Udi is a root Udi.
Declaration
public override bool IsRoot { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Remarks
A root Udi points to the "root of all things" for a given entity type, e.g. the content tree root.
Methods
View SourceEnsureClosed()
Declaration
public GuidUdi EnsureClosed()
Returns
Type | Description |
---|---|
GuidUdi |
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj |
Returns
Type | Description |
---|---|
System.Boolean |
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 |
Parse(String)
Converts the string representation of an entity identifier into the equivalent GuidUdi instance.
Declaration
public static GuidUdi Parse(string s)
Parameters
Type | Name | Description |
---|---|---|
System.String | s | The string to convert. |
Returns
Type | Description |
---|---|
GuidUdi | A GuidUdi instance that contains the value that was parsed. |
TryParse(String, out GuidUdi)
Declaration
public static bool TryParse(string s, out GuidUdi udi)
Parameters
Type | Name | Description |
---|---|---|
System.String | s | |
GuidUdi | udi |
Returns
Type | Description |
---|---|
System.Boolean |