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); }
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()); }
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); }
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; }
public override int GetHashCode() { return(Singular.GetHashCode() ^ (Plural?.GetHashCode() ?? 0) ^ (Context?.GetHashCode() ?? 0)); }