int IEqualityComparer <Options> .GetHashCode(Options obj) { return (Hashing.GetHashCode(GetTemplateComparer(obj.MatchCase).GetHashCode(obj.Template), Hashing.GetHashCode(obj.WholeWord.GetHashCode(), Hashing.GetHashCode(obj.MatchCase.GetHashCode(), Hashing.GetHashCode(obj.ContentTypes.GetHashCode(), Hashing.GetHashCode(obj.Scope.GetHashCode() )))))); }
public override int GetHashCode() { if (hash == null) { if (MatchesAllSourcesInternal()) { hash = RuntimeHelpers.GetHashCode(FilterScope.DefaultScope); } else { hash = Hashing.GetHashCode(includeAllFromSources.Select(s => s.GetHashCode()).Union(includeAllFromThreads.Select(t => t.GetHashCode()))); } } return(hash.Value); }
/// <summary> /// Calculates an integer hash out of all fields that the message builder type depends on /// </summary> int GetMessageBuilderTypeHash() { int typeHash = Hashing.GetHashCode(0); foreach (string i in inputFieldNames) { typeHash = Hashing.GetHashCode(typeHash, i.GetHashCode()); } foreach (OutputFieldStruct i in outputFields) { typeHash = Hashing.GetHashCode(typeHash, (int)i.Type); typeHash = Hashing.GetHashCode(typeHash, i.Name.GetHashCode()); typeHash = Hashing.GetHashCode(typeHash, i.Code.GetHashCode()); } foreach (ExtensionInfo i in extensions) { typeHash = Hashing.GetHashCode(typeHash, i.ExtensionAssemblyName.GetType().GetHashCode()); typeHash = Hashing.GetHashCode(typeHash, i.ExtensionClassName.GetType().GetHashCode()); typeHash = Hashing.GetHashCode(typeHash, i.ExtensionName.GetHashCode()); } return(typeHash); }