Class StringUdi
Represents a string-based entity identifier.
Namespace: Umbraco.Core
Assembly: Umbraco.Core.dll
Syntax
[TypeConverter(typeof(UdiTypeConverter))]
public class StringUdi : Udi, IComparable<Udi>
Constructors
View SourceStringUdi(String, String)
Initializes a new instance of the StringUdi class with an entity type and a string id.
Declaration
public StringUdi(string entityType, string id)
Parameters
Type | Name | Description |
---|---|---|
System.String | entityType | The entity type part of the udi. |
System.String | id | The string id part of the udi. |
StringUdi(Uri)
Initializes a new instance of the StringUdi class with a uri value.
Declaration
public StringUdi(Uri uriValue)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | uriValue | The uri value of the udi. |
Properties
View SourceId
The string part of the identifier.
Declaration
public string Id { get; }
Property Value
Type | Description |
---|---|
System.String |
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 StringUdi EnsureClosed()
Returns
Type | Description |
---|---|
StringUdi |
Parse(String)
Converts the string representation of an entity identifier into the equivalent StringUdi instance.
Declaration
public static StringUdi Parse(string s)
Parameters
Type | Name | Description |
---|---|---|
System.String | s | The string to convert. |
Returns
Type | Description |
---|---|
StringUdi | A StringUdi instance that contains the value that was parsed. |
TryParse(String, out StringUdi)
Declaration
public static bool TryParse(string s, out StringUdi udi)
Parameters
Type | Name | Description |
---|---|---|
System.String | s | |
StringUdi | udi |
Returns
Type | Description |
---|---|
System.Boolean |