예제 #1
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Type.Length != 0)
            {
                hash ^= Type.GetHashCode();
            }
            hash ^= pattern_.GetHashCode();
            if (NameField.Length != 0)
            {
                hash ^= NameField.GetHashCode();
            }
            if (History != global::Google.Api.ResourceDescriptor.Types.History.Unspecified)
            {
                hash ^= History.GetHashCode();
            }
            if (Plural.Length != 0)
            {
                hash ^= Plural.GetHashCode();
            }
            if (Singular.Length != 0)
            {
                hash ^= Singular.GetHashCode();
            }
            hash ^= style_.GetHashCode();
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
예제 #2
0
        public override int GetHashCode()
        {
            var hash = 0x1505L;

            if (Context != null)
            {
                hash = ((hash << 5) + hash) ^ Context.GetHashCode();
            }
            hash = ((hash << 5) + hash) ^ Singular.GetHashCode();
            if (Plural != null)
            {
                hash = ((hash << 5) + hash) ^ Plural.GetHashCode();
            }

            return(hash.GetHashCode());
        }
예제 #3
0
        public string GetFormattedOutput(int id)
        {
            string output = "{dialog " + id;

            if (!String.IsNullOrWhiteSpace(Singular))
            {
                output += ", singular=\"" + Singular.TrimEnd() + " \"";
            }
            if (!String.IsNullOrWhiteSpace(Plural))
            {
                output += ", plural=\"" + Plural.TrimEnd() + "\"";
            }
            output += "}\n";
            output += Text + "\n";
            output += "{/dialog}\n\n";
            return(output);
        }
예제 #4
0
        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;
            }
        }
예제 #5
0
 public Verbose(Type type)
 {
     Singular = type.Name.SplitCamelCase();
     Plural   = Singular.Pluralize().SplitCamelCase();
     Group    = IlaroAdminResources.Others;
 }
예제 #6
0
파일: Keyword.cs 프로젝트: qbikez/Odachi
 public override int GetHashCode()
 {
     return(Singular.GetHashCode() ^ (Plural?.GetHashCode() ?? 0) ^ (Context?.GetHashCode() ?? 0));
 }