using System; using System.Reflection; namespace Chernobyl.Attribution { /// /// An that is applied to any class or struct. /// When executed, instances of this type will execute any the /// types found on /// any methods of the type attributed. /// [AttributeUsage(AttributeTargets.Struct | AttributeTargets.Class)] public class ProcessMethodsAttribute : Attribute, IProcessAttribute { /// /// Performs the task requested on the /// passed in. /// /// The /// this was applied to and that is to be /// processed. public void Process(Type attributeProvider) { attributeProvider.GetMethods().Process(Inherited); } /// /// True if this instance should look up the hierarchy chain of each /// for /// attributes. /// public bool Inherited { get; set; } } }