namespace Umbraco.Cms.Core.Composing;
///
/// Indicates that a composer should be enabled.
///
///
///
/// 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 has greater priority than
///
/// attribute when it is marking the composer itself, but lower priority that when it is referencing another
/// composer.
///
///
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = false)]
public class EnableAttribute : Attribute
{
///
/// Initializes a new instance of the class.
///
public EnableAttribute()
{
}
///
/// Initializes a new instance of the class.
///
public EnableAttribute(Type enabledType) => EnabledType = enabledType;
///
/// Gets the enabled type, or null if it is the composer marked with the attribute.
///
public Type? EnabledType { get; }
}