using System; namespace Umbraco.Core.Components { /// /// Indicates that a component should be enabled. /// /// /// If a type is specified, enables the component of that type, else enables the component marked with the attribute. /// This attribute is *not* inherited. /// This attribute applies to classes only, it is not possible to enable/disable interfaces. /// If a component ends up being both enabled and disabled: attributes marking the component itself have lower priority /// than attributes on *other* components, eg if a component declares itself as disabled it is possible to enable it from /// another component. Anything else is unspecified. /// [AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = false)] public class EnableComponentAttribute : Attribute { /// /// Initializes a new instance of the class. /// public EnableComponentAttribute() { } /// /// Initializes a new instance of the class. /// public EnableComponentAttribute(Type enabledType) { EnabledType = enabledType; } /// /// Gets the enabled type, or null if it is the component marked with the attribute. /// public Type EnabledType { get; } } }