Class GuidUdi
Represents a guid-based entity identifier.
Namespace: Umbraco.Cms.Core
Assembly: Umbraco.Core.dll
Syntax
[TypeConverter(typeof(UdiTypeConverter))]
public class GuidUdi : 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 |
|---|---|---|
| string | entityType | The entity type part of the udi. |
| 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 |
|---|---|---|
| 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 |
|---|---|
| Guid |
IsRoot
Gets a value indicating whether this Udi is a root Udi.
Declaration
public override bool IsRoot { get; }
Property Value
| Type | Description |
|---|---|
| bool |
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()
Ensures that this GuidUdi is not a root Udi.
Declaration
public GuidUdi EnsureClosed()
Returns
| Type | Description |
|---|---|
| GuidUdi | This GuidUdi. |
Exceptions
| Type | Condition |
|---|---|
| Exception | When this Udi is a root Udi. |
Equals(object?)
Declaration
public override bool Equals(object? obj)
Parameters
| Type | Name | Description |
|---|---|---|
| object | obj |
Returns
| Type | Description |
|---|---|
| bool |
GetHashCode()
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| int |