View Source
  Class Udi
  
  Represents an entity identifier.
    Inheritance
      System.Object
      
   
  
  Assembly: Umbraco.Core.dll
  Syntax
  
    [TypeConverter(typeof(UdiTypeConverter))]
public abstract class Udi : IComparable<Udi>
   
  
  
  Constructors
  
  
    View Source
  
  Udi(String, String)
  Initializes a new instance of the Udi class.
Declaration
  
    protected Udi(string entityType, string stringValue)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | System.String | entityType | The entity type part of the identifier. | 
      
        | System.String | stringValue | The string value of the identifier. | 
    
  
  
    View Source
  
  Udi(Uri)
  Initializes a new instance of the Udi class.
Declaration
  
    protected Udi(Uri uriValue)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | Uri | uriValue | The uri value of the identifier. | 
    
  
  Properties
  
  
    View Source
  
  EntityType
  Gets the entity type part of the identifier.
Declaration
  
    public string EntityType { get; }
   
  Property Value
  
    
      
        | Type | Description | 
    
    
      
        | System.String |  | 
    
  
  
    View Source
  
  IsRoot
  Gets a value indicating whether this Udi is a root Udi.
Declaration
  
    public abstract bool IsRoot { get; }
   
  Property Value
  
    
      
        | Type | Description | 
    
    
      
        | System.Boolean |  | 
    
  
  
  
  
    View Source
  
  UriValue
  
  
  Declaration
  
    public Uri UriValue { get; }
   
  Property Value
  
  Methods
  
  
    View Source
  
  CompareTo(Udi)
  
  
  Declaration
  
    public int CompareTo(Udi other)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | Udi | other |  | 
    
  
  Returns
  
    
      
        | Type | Description | 
    
    
      
        | System.Int32 |  | 
    
  
  
    View Source
  
  Create(String)
  Creates a root Udi for an entity type.
Declaration
  
    public static Udi Create(string entityType)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | System.String | entityType | The entity type. | 
    
  
  Returns
  
    
      
        | Type | Description | 
    
    
      
        | Udi | The root Udi for the entity type. | 
    
  
  
    View Source
  
  Create(String, Guid)
  
  
  Declaration
  
    public static Udi Create(string entityType, Guid id)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | System.String | entityType | The entity type. | 
      
        | Guid | id | The identifier. | 
    
  
  Returns
  
    
      
        | Type | Description | 
    
    
      
        | Udi | The Guid Udi for the entity type and identifier. | 
    
  
  
    View Source
  
  Create(String, String)
  
  
  Declaration
  
    public static Udi Create(string entityType, string id)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | System.String | entityType | The entity type. | 
      
        | System.String | id | The identifier. | 
    
  
  Returns
  
    
      
        | Type | Description | 
    
    
      
        | Udi | The string Udi for the entity type and identifier. | 
    
  
  
    View Source
  
  Create(Uri)
  
  
  Declaration
  
    public static Udi Create(Uri uri)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | Uri | uri |  | 
    
  
  Returns
  
  
    View Source
  
  EnsureNotRoot()
  Ensures that this Udi is not a root Udi.
Declaration
  
    public Udi EnsureNotRoot()
   
  Returns
  
    
      
        | Type | Description | 
    
    
      
        | Udi | This Udi. | 
    
  
  
    View Source
  
  EnsureType(String[])
  
  
  Declaration
  
    public void EnsureType(params string[] validTypes)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | System.String[] | validTypes |  | 
    
  
  
    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
  
  GetHashCode()
  
  
  Declaration
  
    public override int GetHashCode()
   
  Returns
  
    
      
        | Type | Description | 
    
    
      
        | System.Int32 |  | 
    
  
  
    View Source
  
  ToString()
  
  
  Declaration
  
    public override string ToString()
   
  Returns
  
    
      
        | Type | Description | 
    
    
      
        | System.String |  | 
    
  
  Operators
  
  
    View Source
  
  Equality(Udi, Udi)
  
  
  Declaration
  
    public static bool operator ==(Udi udi1, Udi udi2)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | Udi | udi1 |  | 
      
        | Udi | udi2 |  | 
    
  
  Returns
  
    
      
        | Type | Description | 
    
    
      
        | System.Boolean |  | 
    
  
  
    View Source
  
  Inequality(Udi, Udi)
  
  
  Declaration
  
    public static bool operator !=(Udi udi1, Udi udi2)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | Udi | udi1 |  | 
      
        | Udi | udi2 |  | 
    
  
  Returns
  
    
      
        | Type | Description | 
    
    
      
        | System.Boolean |  |