using System; namespace Umbraco.Core.Components { /// /// Indicates that a component should be disabled. /// /// /// If a type is specified, disables the component of that type, else disables 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 DisableComponentAttribute : Attribute { /// /// Initializes a new instance of the class. /// public DisableComponentAttribute() { } /// /// Initializes a new instance of the class. /// public DisableComponentAttribute(Type disabledType) { DisabledType = disabledType; } /// /// Gets the disabled type, or null if it is the component marked with the attribute. /// public Type DisabledType { get; } } }