public Verbose(Type type) { var verboseAttributes = type.GetCustomAttributes( typeof(VerboseAttribute), false) as VerboseAttribute[]; if (verboseAttributes.IsNullOrEmpty <VerboseAttribute>() == false) { var verbose = verboseAttributes.FirstOrDefault(); Singular = verbose.Singular ?? type.Name.SplitCamelCase(); Plural = verbose.Plural ?? Singular.Pluralize().SplitCamelCase(); Group = verbose.GroupName ?? IlaroAdminResources.Others; } else { Singular = type.Name.SplitCamelCase(); Plural = Singular.Pluralize().SplitCamelCase(); Group = IlaroAdminResources.Others; } }
public Verbose(Type type) { Singular = type.Name.SplitCamelCase(); Plural = Singular.Pluralize().SplitCamelCase(); Group = IlaroAdminResources.Others; }