Search Results for

    Show / Hide Table of Contents
    View Source

    Class EnableAttribute

    Indicates that a composer should be enabled.

    Inheritance
    System.Object
    Namespace: Umbraco.Cms.Core.Composing
    Assembly: Umbraco.Core.dll
    Syntax
    public class EnableAttribute : Attribute
    Remarks

    If a type is specified, enables the composer of that type, else enables the composer marked with the attribute.

    This attribute is not inherited.

    This attribute applies to classes only, it is not possible to enable/disable interfaces.

    Assembly-level DisableComposerAttribute has greater priority than DisableAttribute attribute when it is marking the composer itself, but lower priority that when it is referencing another composer.

    Constructors

    View Source

    EnableAttribute()

    Initializes a new instance of the EnableAttribute class.

    Declaration
    public EnableAttribute()
    View Source

    EnableAttribute(Type)

    Initializes a new instance of the EnableAttribute class.

    Declaration
    public EnableAttribute(Type enabledType)
    Parameters
    Type Name Description
    Type enabledType

    Properties

    View Source

    EnabledType

    Gets the enabled type, or null if it is the composer marked with the attribute.

    Declaration
    public Type? EnabledType { get; }
    Property Value
    Type Description
    System.Nullable<Type>
    • Improve this Doc
    • View Source
    In This Article
    • Constructors
      • EnableAttribute()
      • EnableAttribute(Type)
    • Properties
      • EnabledType
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX