Example #1
0
        static public T GetCustomAttributeOfType <T>(this IDynamicCustomAttributeProvider item, bool inherit) where T : Attribute
        {
            T attribute;

            item.TryGetCustomAttributeOfType <T>(inherit, out attribute);
            return(attribute);
        }
Example #2
0
        static public Attribute GetCustomAttributeOfType(this IDynamicCustomAttributeProvider item, Type attribute_type, bool inherit)
        {
            Attribute attribute;

            item.TryGetCustomAttributeOfType(attribute_type, inherit, out attribute);
            return(attribute);
        }