コード例 #1
0
ファイル: Verbose.cs プロジェクト: anupvarghese/Ilaro.Admin
        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;
            }
        }
コード例 #2
0
ファイル: Verbose.cs プロジェクト: xareas/Ilaro.Admin
 public Verbose(Type type)
 {
     Singular = type.Name.SplitCamelCase();
     Plural   = Singular.Pluralize().SplitCamelCase();
     Group    = IlaroAdminResources.Others;
 }