Search Results for

    Show / Hide Table of Contents
    View Source

    Class ComposeAfterAttribute

    Indicates that a composer requires another composer.

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

    This attribute is not inherited. This means that a composer class inheriting from another composer class does not inherit its requirements. However, the runtime checks the interfaces of every composer for their requirements, so requirements declared on interfaces are inherited by every composer class implementing the interface.

    When targeting a class, indicates a dependency on the composer which must be enabled, unless the requirement has explicitly been declared as weak (and then, only if the composer is enabled).

    When targeting an interface, indicates a dependency on enabled composers implementing the interface. It could be no composer at all, unless the requirement has explicitly been declared as strong (and at least one composer must be enabled).

    Constructors

    View Source

    ComposeAfterAttribute(Type)

    Initializes a new instance of the ComposeAfterAttribute class.

    Declaration
    public ComposeAfterAttribute(Type requiredType)
    Parameters
    Type Name Description
    Type requiredType

    The type of the required composer.

    View Source

    ComposeAfterAttribute(Type, Boolean)

    Initializes a new instance of the ComposeAfterAttribute class.

    Declaration
    public ComposeAfterAttribute(Type requiredType, bool weak)
    Parameters
    Type Name Description
    Type requiredType

    The type of the required composer.

    System.Boolean weak

    A value indicating whether the requirement is weak.

    Properties

    View Source

    RequiredType

    Gets the required type.

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

    Weak

    Gets a value indicating whether the requirement is weak.

    Declaration
    public bool? Weak { get; }
    Property Value
    Type Description
    System.Nullable<System.Boolean>
    Remarks

    Returns true if the requirement is weak (requires the other composer if it is enabled), false if the requirement is strong (requires the other composer to be enabled), and null if unspecified, in which case it is strong for classes and weak for interfaces.

    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX