258 references to Hash
Microsoft.CodeAnalysis (258)
CaseInsensitiveComparison.cs (2)
256int hashCode = Hash.FnvOffsetBias; 260hashCode = Hash.CombineFNVHash(hashCode, ToLower(str[i]));
CodeGen\LocalDebugId.cs (1)
74return Hash.Combine(SyntaxOffset, Ordinal);
CodeGen\LocalSlotDebugInfo.cs (1)
34return Hash.Combine((int)SynthesizedKind, Id.GetHashCode());
CodeGen\LocalSlotManager.cs (1)
58=> Hash.Combine(Cci.SymbolEquivalentEqualityComparer.Instance.GetHashCode(_type), (int)_constraints);
CodeGen\PrivateImplementationDetails.cs (1)
553Hash.Combine(constant.GetHashCode(), hash);
Collections\BitVector.cs (2)
73bitsHash = Hash.Combine(_bits[i].GetHashCode(), bitsHash); 77return Hash.Combine(_capacity, bitsHash);
Collections\ByteSequenceComparer.cs (2)
98return Hash.GetFNVHashCode(x); 104return Hash.GetFNVHashCode(x);
Collections\Rope.cs (1)
78result = Hash.Combine((int)c, result);
CommandLine\AnalyzerConfigSet.cs (1)
91public int GetHashCode(List<Section> obj) => Hash.CombineValues(obj);
CommandLine\CommandLineAnalyzerReference.cs (1)
47return Hash.Combine(_path, 0);
CommandLine\CommandLineReference.cs (1)
56return Hash.Combine(_reference, _properties.GetHashCode());
CommandLine\CommonCompiler.SuppressionDiagnostic.cs (2)
90return Hash.Combine(_originalDiagnostic.GetHashCode(), 91Hash.Combine(_suppressionId.GetHashCode(), _suppressionJustification.GetHashCode()));
CommandLine\SarifDiagnosticComparer.cs (8)
66return Hash.Combine(obj.Category.GetHashCode(), 67Hash.Combine(((int)obj.DefaultSeverity).GetHashCode(), 68Hash.Combine(obj.Description.GetHashCode(), 69Hash.Combine(obj.HelpLinkUri.GetHashCode(), 70Hash.Combine(obj.Id.GetHashCode(), 71Hash.Combine(obj.IsEnabledByDefault.GetHashCode(), 72Hash.Combine(obj.Title.GetHashCode(), 73Hash.CombineValues(obj.ImmutableCustomTags))))))));
Compilation\CompilationOptions.cs (30)
671return Hash.Combine(this.CheckOverflow, 672Hash.Combine(this.ConcurrentBuild, 673Hash.Combine(this.Deterministic, 674Hash.Combine(this.CurrentLocalTime.GetHashCode(), 675Hash.Combine(this.DebugPlusMode, 676Hash.Combine(this.CryptoKeyContainer != null ? StringComparer.Ordinal.GetHashCode(this.CryptoKeyContainer) : 0, 677Hash.Combine(this.CryptoKeyFile != null ? StringComparer.Ordinal.GetHashCode(this.CryptoKeyFile) : 0, 678Hash.Combine(Hash.CombineValues(this.CryptoPublicKey, 16), 679Hash.Combine((int)this.GeneralDiagnosticOption, 680Hash.Combine(this.MainTypeName != null ? StringComparer.Ordinal.GetHashCode(this.MainTypeName) : 0, 681Hash.Combine((int)this.MetadataImportOptions, 682Hash.Combine(this.ReferencesSupersedeLowerVersions, 683Hash.Combine(this.ModuleName != null ? StringComparer.Ordinal.GetHashCode(this.ModuleName) : 0, 684Hash.Combine((int)this.OptimizationLevel, 685Hash.Combine((int)this.OutputKind, 686Hash.Combine((int)this.Platform, 687Hash.Combine(this.ReportSuppressedDiagnostics, 688Hash.Combine(this.ScriptClassName != null ? StringComparer.Ordinal.GetHashCode(this.ScriptClassName) : 0, 689Hash.Combine(Hash.CombineValues(this.SpecificDiagnosticOptions), 690Hash.Combine(this.WarningLevel, 691Hash.Combine(this.MetadataReferenceResolver, 692Hash.Combine(this.XmlReferenceResolver, 693Hash.Combine(this.SourceReferenceResolver, 694Hash.Combine(this.SyntaxTreeOptionsProvider, 695Hash.Combine(this.StrongNameProvider, 696Hash.Combine(this.AssemblyIdentityComparer, 697Hash.Combine(this.PublicSign, 698Hash.Combine((int)this.NullableContextOptions, 0))))))))))))))))))))))))))));
Compilation\LoadDirective.cs (1)
41return Hash.Combine(this.Diagnostics.GetHashCode(), this.ResolvedPath?.GetHashCode() ?? 0);
Compilation\ParseOptions.cs (7)
153Hash.Combine((int)this.SpecifiedKind, 154Hash.Combine((int)this.DocumentationMode, 155Hash.Combine(HashFeatures(this.Features), 156Hash.Combine(Hash.CombineValues(this.PreprocessorSymbolNames, StringComparer.Ordinal), 0)))); 164value = Hash.Combine(kv.Key.GetHashCode(), 165Hash.Combine(kv.Value.GetHashCode(), value));
Compilation\PreprocessingSymbolInfo.cs (2)
44return Hash.Combine(this.IsDefined, Hash.Combine(this.Symbol, 0));
Compilation\SubsystemVersion.cs (1)
195return Hash.Combine(this.Minor.GetHashCode(), this.Major.GetHashCode());
Compilation\SymbolInfo.cs (3)
92=> Hash.Combine(this.Symbol, Hash.Combine(Hash.CombineValues(this.CandidateSymbols, 4), (int)this.CandidateReason));
Compilation\TypeInfo.cs (3)
66return Hash.Combine(this.ConvertedType, 67Hash.Combine(this.Type, 68Hash.Combine(this.Nullability.GetHashCode(),
ConstantValueSpecialized.cs (10)
202return Hash.Combine(base.GetHashCode(), _value.GetHashCode()); 261return Hash.Combine(base.GetHashCode(), _value.GetHashCode()); 302return Hash.Combine(base.GetHashCode(), _value.GetHashCode()); 720return Hash.Combine(base.GetHashCode(), _value.GetHashCode()); 777return Hash.Combine(base.GetHashCode(), _value.GetHashCode()); 820return Hash.Combine(base.GetHashCode(), _value.GetHashCode()); 863return Hash.Combine(base.GetHashCode(), _value.GetHashCode()); 907return Hash.Combine(base.GetHashCode(), _value.GetHashCode()); 941return Hash.Combine(base.GetHashCode(), _value.GetHashCode()); 987return Hash.Combine(base.GetHashCode(), _value.GetHashCode());
Diagnostic\CommonDiagnosticComparer.cs (1)
40return Hash.Combine(obj.Location, obj.Id.GetHashCode());
Diagnostic\Diagnostic.DiagnosticWithProgrammaticSuppression.cs (1)
105return Hash.Combine(_originalUnsuppressedDiagnostic.GetHashCode(), _programmaticSuppressionInfo.GetHashCode());
Diagnostic\Diagnostic_SimpleDiagnostic.cs (4)
173return Hash.Combine(_descriptor, 174Hash.CombineValues(_messageArgs, 175Hash.Combine(_warningLevel, 176Hash.Combine(_location, (int)_severity))));
Diagnostic\DiagnosticDescriptor.cs (7)
221return Hash.Combine(this.Category.GetHashCode(), 222Hash.Combine(((int)this.DefaultSeverity).GetHashCode(), 223Hash.Combine(this.Description.GetHashCode(), 224Hash.Combine(this.HelpLinkUri.GetHashCode(), 225Hash.Combine(this.Id.GetHashCode(), 226Hash.Combine(this.IsEnabledByDefault.GetHashCode(), 227Hash.Combine(this.MessageFormat.GetHashCode(),
Diagnostic\DiagnosticInfo.cs (1)
400hashCode = Hash.Combine(_arguments[i], hashCode);
Diagnostic\DiagnosticWithInfo.cs (1)
152return Hash.Combine(this.Location.GetHashCode(), this.Info.GetHashCode());
Diagnostic\ExternalFileLocation.cs (2)
79return Hash.Combine(_lineSpan.GetHashCode(), 80Hash.Combine(_mappedLineSpan.GetHashCode(), _sourceSpan.GetHashCode()));
Diagnostic\FileLinePositionSpan.cs (2)
118=> Hash.Combine(Path, Hash.Combine(HasMappedPath, Span.GetHashCode()));
Diagnostic\LocalizableResourceString.cs (4)
91return Hash.Combine(_nameOfLocalizableResource.GetHashCode(), 92Hash.Combine(_resourceManager.GetHashCode(), 93Hash.Combine(_resourceSource.GetHashCode(), 94Hash.CombineValues(_formatArguments))));
Diagnostic\SourceLocation.cs (1)
125return Hash.Combine(_syntaxTree, _span.GetHashCode());
Diagnostic\SuppressionDescriptor.cs (2)
94return Hash.Combine(this.Id.GetHashCode(), 95Hash.Combine(this.SuppressedDiagnosticId.GetHashCode(), this.Justification.GetHashCode()));
DiagnosticAnalyzer\AdditionalTextComparer.cs (1)
55return Hash.Combine(PathUtilities.Comparer.GetHashCode(obj.Path),
DiagnosticAnalyzer\AnalyzerFileReference.cs (1)
107=> Hash.Combine(RuntimeHelpers.GetHashCode(_assemblyLoader), FullPath.GetHashCode());
DiagnosticAnalyzer\AnalyzerOptions.cs (1)
81return Hash.CombineValues(this.AdditionalFiles);
DiagnosticAnalyzer\SourceOrAdditionalFile.cs (2)
49return Hash.Combine(true, SourceTree.GetHashCode()); 54return Hash.Combine(false, AdditionalFile.GetHashCode());
DiagnosticAnalyzer\Suppression.cs (1)
78return Hash.Combine(
Emit\AnonymousTypeKey.cs (4)
56return Hash.Combine(IsKey, 57Hash.Combine(IgnoreCase, 86return Hash.Combine(this.IsDelegate.GetHashCode(), Hash.CombineValues(this.Fields));
Emit\EditAndContinue\EmitBaseline.cs (1)
55return Hash.Combine(this.ImplementingMethod, this.Index);
Emit\EditAndContinue\EncHoistedLocalInfo.cs (1)
41=> Hash.Combine(Cci.SymbolEquivalentEqualityComparer.Instance.GetHashCode(Type), SlotInfo.GetHashCode());
Emit\EditAndContinue\EncLocalInfo.cs (4)
59return Hash.Combine(SlotInfo.GetHashCode(), 60Hash.Combine(Cci.SymbolEquivalentEqualityComparer.Instance.GetHashCode(Type), 61Hash.Combine((int)Constraints, 62Hash.Combine(IsUnused, 0))));
Emit\EmitOptions.cs (16)
305return Hash.Combine(EmitMetadataOnly, 306Hash.Combine(BaseAddress.GetHashCode(), 307Hash.Combine(FileAlignment, 308Hash.Combine(HighEntropyVirtualAddressSpace, 309Hash.Combine(SubsystemVersion.GetHashCode(), 310Hash.Combine((int)DebugInformationFormat, 311Hash.Combine(PdbFilePath, 312Hash.Combine(PdbChecksumAlgorithm.GetHashCode(), 313Hash.Combine(OutputNameOverride, 314Hash.Combine(RuntimeMetadataVersion, 315Hash.Combine(TolerateErrors, 316Hash.Combine(IncludePrivateMembers, 317Hash.Combine(Hash.CombineValues(InstrumentationKinds), 318Hash.Combine(DefaultSourceFileEncoding, 319Hash.Combine(FallbackSourceFileEncoding, 0)))))))))))))));
Emit\SemanticEdit.cs (2)
219=> Hash.Combine(OldSymbol, Hash.Combine(NewSymbol, (int)Kind));
FileKey.cs (1)
45return Hash.Combine(
FileSystem\PathUtilities.cs (1)
694hc = Hash.Combine(char.ToUpperInvariant(ch), hc);
FileSystem\RelativePathResolver.cs (2)
64Hash.Combine(BaseDirectory, Hash.CombineValues(SearchPaths));
InternalUtilities\CharMemoryEqualityComparer.cs (1)
21public int GetHashCode(ReadOnlyMemory<char> mem) => Hash.GetFNVHashCode(mem.Span);
InternalUtilities\Hash.cs (24)
64hashCode = Hash.Combine(value.GetHashCode(), hashCode); 84hashCode = Hash.Combine(value.GetHashCode(), hashCode); 107hashCode = Hash.Combine(value.GetHashCode(), hashCode); 133hashCode = Hash.Combine(value.GetHashCode(), hashCode); 158hashCode = Hash.Combine(stringComparer.GetHashCode(value), hashCode); 178hashCode = Hash.Combine(stringComparer.GetHashCode(value), hashCode); 204int hashCode = Hash.FnvOffsetBias; 208hashCode = unchecked((hashCode ^ data[i]) * Hash.FnvPrime); 225int hashCode = Hash.FnvOffsetBias; 233hashCode = unchecked((hashCode ^ b) * Hash.FnvPrime); 248int hashCode = Hash.FnvOffsetBias; 252hashCode = unchecked((hashCode ^ data[i]) * Hash.FnvPrime); 268return CombineFNVHash(Hash.FnvOffsetBias, data); 293int hashCode = Hash.FnvOffsetBias; 297hashCode = unchecked((hashCode ^ CaseInsensitiveComparison.ToLower(data[i])) * Hash.FnvPrime); 323return CombineFNVHash(Hash.FnvOffsetBias, text); 334int hashCode = Hash.FnvOffsetBias; 365int hashCode = Hash.FnvOffsetBias; 370hashCode = unchecked((hashCode ^ text[i]) * Hash.FnvPrime); 387return Hash.CombineFNVHash(Hash.FnvOffsetBias, ch); 401hashCode = unchecked((hashCode ^ ch) * Hash.FnvPrime); 416return unchecked((hashCode ^ ch) * Hash.FnvPrime); 430hashCode = unchecked((hashCode ^ data[i]) * Hash.FnvPrime);
InternalUtilities\StringOrdinalComparer.cs (1)
42return Hash.GetFNVHashCode(s);
InternalUtilities\StringTable.cs (7)
117var hashCode = Hash.GetFNVHashCode(chars, start, len); 151var hashCode = Hash.GetFNVHashCode(chars, start, len); 185var hashCode = Hash.GetFNVHashCode(chars); 219var hashCode = Hash.GetFNVHashCode(chars); 253var hashCode = Hash.GetFNVHashCode(chars); 567var hashCode = Hash.GetFNVHashCode(chars); 587int hashCode = Hash.GetFNVHashCode(bytes, out bool isAscii);
MetadataReader\MetadataTypeName.Key.cs (5)
99return Hash.Combine(GetHashCodeName(), 100Hash.Combine(_useCLSCompliantNameArityEncoding != 0, 106int hashCode = Hash.GetFNVHashCode(_namespaceOrFullyQualifiedName); 110hashCode = Hash.CombineFNVHash(hashCode, MetadataHelpers.DotDelimiter); 111hashCode = Hash.CombineFNVHash(hashCode, _typeName);
MetadataReference\AssemblyIdentity.cs (4)
416Hash.Combine(AssemblyIdentityComparer.SimpleNameComparer.GetHashCode(_name), 417Hash.Combine(_version.GetHashCode(), GetHashCodeIgnoringNameAndVersion())); 426Hash.Combine((int)_contentType, 427Hash.Combine(_isRetargetable,
MetadataReference\CompilationReference.cs (1)
140return Hash.Combine(this.Compilation.GetHashCode(), this.Properties.GetHashCode());
MetadataReference\MetadataReferenceProperties.cs (4)
174return Hash.Combine(Hash.CombineValues(Aliases), Hash.Combine(_embedInteropTypes, Hash.Combine(HasRecursiveAliases, ((int)_kind).GetHashCode())));
PEWriter\MemberRefComparer.cs (3)
60int hash = Hash.Combine(memberRef.Name, _metadataWriter.GetMemberReferenceParent(memberRef).GetHashCode()); 65hash = Hash.Combine(hash, _metadataWriter.GetFieldSignatureIndex(fieldRef).GetHashCode()); 72hash = Hash.Combine(hash, _metadataWriter.GetMethodSignatureHandle(methodRef).GetHashCode());
PEWriter\MetadataWriter.cs (1)
4344return Hash.Combine(ByteSequenceComparer.GetHashCode(x.Item1), x.Item2.GetHashCode());
PEWriter\MetadataWriter.PortablePdb.cs (2)
50return Hash.Combine(Hash.CombineValues(obj.GetUsedNamespaces(_context)), obj.Parent != null ? GetHashCode(obj.Parent) : 0);
PEWriter\MethodSpecComparer.cs (1)
35return Hash.Combine(
PEWriter\Units.cs (1)
65return Hash.Combine(RuntimeHelpers.GetHashCode(Definition), StartLine.GetHashCode());
PEWriter\UsedNamespaceOrType.cs (5)
77return Hash.Combine(AliasOpt, 78Hash.Combine((object?)TargetAssemblyOpt, 79Hash.Combine(GetHashCode(TargetNamespaceOpt), 80Hash.Combine(GetHashCode(TargetTypeOpt), 81Hash.Combine(TargetXmlNamespaceOpt, 0)))));
SourceFileResolver.cs (4)
150return Hash.Combine(_baseDirectory != null ? StringComparer.Ordinal.GetHashCode(_baseDirectory) : 0, 151Hash.Combine(Hash.CombineValues(_searchPaths, StringComparer.Ordinal), 152Hash.CombineValues(_pathMap)));
SourceGeneration\GlobalAliases.cs (1)
67hashCode = Hash.Combine(tuple.GetHashCode(), hashCode);
StrongName\DesktopStrongNameProvider.cs (1)
267return Hash.CombineValues(_keyFileSearchPaths, StringComparer.Ordinal);
SymbolDisplay\FormattedSymbol.cs (1)
48return Hash.Combine(
Symbols\Attributes\CommonAttributeDataComparer.cs (8)
43hash = attr.AttributeConstructor != null ? Hash.Combine(attr.AttributeConstructor.GetHashCode(), hash) : hash; 44hash = Hash.Combine(attr.HasErrors, hash); 45hash = Hash.Combine(attr.IsConditionallyOmitted, hash); 46hash = Hash.Combine(GetHashCodeForConstructorArguments(attr.CommonConstructorArguments), hash); 47hash = Hash.Combine(GetHashCodeForNamedArguments(attr.NamedArguments), hash); 58hash = Hash.Combine(arg.GetHashCode(), hash); 72hash = Hash.Combine(arg.Key.GetHashCode(), hash); 75hash = Hash.Combine(arg.Value.GetHashCode(), hash);
Symbols\NullabilityInfo.cs (1)
40Hash.Combine(((int)Annotation).GetHashCode(), ((int)FlowState).GetHashCode());
Symbols\TypedConstant.cs (2)
214return Hash.Combine(_value, 215Hash.Combine(_type, (int)this.Kind));
Symbols\TypeLayout.cs (2)
75return Hash.Combine(Hash.Combine(this.Size, this.Alignment), _kind);
Syntax\ChildSyntaxList.Reversed.cs (1)
55return _node != null ? Hash.Combine(_node.GetHashCode(), _count) : 0;
Syntax\GreenNode.cs (1)
988code = Hash.Combine(RuntimeHelpers.GetHashCode(child), code);
Syntax\InternalSyntax\SyntaxNodeCache.cs (6)
278code = Hash.Combine(System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(child1), code); 290code = Hash.Combine(System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(child1), code); 294code = Hash.Combine(System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(child2), code); 307code = Hash.Combine(System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(child1), code); 311code = Hash.Combine(System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(child2), code); 315code = Hash.Combine(System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(child3), code);
Syntax\LineMapping.cs (2)
54=> Hash.Combine(Hash.Combine(Span.GetHashCode(), CharacterOffset.GetHashCode()), MappedSpan.GetHashCode());
Syntax\SyntaxNodeOrToken.cs (2)
741return Hash.Combine(_nodeOrParent, Hash.Combine(_token, _tokenIndex));
Syntax\SyntaxToken.cs (3)
574return Hash.Combine(Parent, Hash.Combine(Node, Hash.Combine(Position, Index)));
Syntax\SyntaxTokenList.cs (1)
515return Hash.Combine(Node, _index);
Syntax\SyntaxTreeComparer.cs (1)
33return Hash.Combine(obj.FilePath.GetHashCode(), SourceTextComparer.Instance.GetHashCode(obj.GetText()));
Syntax\SyntaxTrivia.cs (3)
287return Hash.Combine(Token.GetHashCode(), Hash.Combine(UnderlyingNode, Hash.Combine(Position, Index)));
Syntax\SyntaxTriviaList.cs (2)
484return Hash.Combine(Token.GetHashCode(), Hash.Combine(Node, Index));
Text\LinePosition.cs (1)
124return Hash.Combine(Line, Character);
Text\LinePositionSpan.cs (1)
69return Hash.Combine(_start.GetHashCode(), _end.GetHashCode());
Text\SourceTextComparer.cs (4)
36var contentsHash = !checksum.IsDefault ? Hash.CombineValues(checksum) : 0; 39return Hash.Combine(obj.Length, 40Hash.Combine(contentsHash, 41Hash.Combine(encodingHash, ((int)obj.ChecksumAlgorithm).GetHashCode())));
Text\TextChange.cs (1)
71return Hash.Combine(this.Span.GetHashCode(), this.NewText?.GetHashCode() ?? 0);
Text\TextChangeRange.cs (1)
71return Hash.Combine(this.NewLength, this.Span.GetHashCode());
Text\TextLine.cs (2)
212return Hash.Combine(_text, Hash.Combine(_start, _endIncludingBreaks));
Text\TextSpan.cs (1)
235return Hash.Combine(Start, Length);