Class UdiDefinitionAttribute
Attribute used to define a UDI (Umbraco Document Identifier) type for an entity.
Inheritance
object
Attribute
Namespace: Umbraco.Cms.Core
Assembly: Umbraco.Core.dll
Syntax
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = false)]
public sealed class UdiDefinitionAttribute : Attribute
Remarks
This attribute can be applied multiple times to a class to define multiple UDI types.
Constructors
View SourceUdiDefinitionAttribute(string, UdiType)
Initializes a new instance of the UdiDefinitionAttribute class.
Declaration
public UdiDefinitionAttribute(string entityType, UdiType udiType)
Parameters
| Type | Name | Description |
|---|---|---|
| string | entityType | The entity type for the UDI. |
| UdiType | udiType | The type of UDI (GUID or String). |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | The entity type is null or whitespace. |
| ArgumentException | The UDI type is not valid. |
Properties
View SourceEntityType
Gets the entity type for this UDI definition.
Declaration
public string EntityType { get; }
Property Value
| Type | Description |
|---|---|
| string |
UdiType
Gets the type of UDI (GUID or String) for this definition.
Declaration
public UdiType UdiType { get; }
Property Value
| Type | Description |
|---|---|
| UdiType |