Rock.Reflection.GetCategory C# (CSharp) Méthode

GetCategory() public static méthode

Returns the Category Attribute value for a given type
public static GetCategory ( Type type ) : string
type System.Type
Résultat string
        public static string GetCategory( Type type )
        {
            foreach ( var categoryAttribute in type.GetCustomAttributes( typeof( CategoryAttribute ), true ) )
            {
                return ( (CategoryAttribute)categoryAttribute ).Category;
            }
            return null;
        }