Search Results for

    Show / Hide Table of Contents
    View Source

    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 Source

    UdiDefinitionAttribute(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 Source

    EntityType

    Gets the entity type for this UDI definition.

    Declaration
    public string EntityType { get; }
    Property Value
    Type Description
    string
    View Source

    UdiType

    Gets the type of UDI (GUID or String) for this definition.

    Declaration
    public UdiType UdiType { get; }
    Property Value
    Type Description
    UdiType
    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX