110 references to Hash
Microsoft.CodeAnalysis.CodeStyle (110)
src\Analyzers\Core\Analyzers\Helpers\DiagnosticHelper.cs (2)
384return Hash.Combine( 386Hash.CombineValues(_formatArguments));
src\Compilers\Core\Portable\Collections\BitVector.cs (2)
73bitsHash = Hash.Combine(_bits[i].GetHashCode(), bitsHash); 77return Hash.Combine(_capacity, bitsHash);
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
694hc = Hash.Combine(char.ToUpperInvariant(ch), hc);
src\Compilers\Core\Portable\FileSystem\RelativePathResolver.cs (2)
64Hash.Combine(BaseDirectory, Hash.CombineValues(SearchPaths));
src\Compilers\Core\Portable\InternalUtilities\Hash.cs (25)
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; 348hashCode = unchecked((hashCode ^ text[i]) * Hash.FnvPrime); 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);
src\Compilers\Core\Portable\InternalUtilities\ReadOnlyMemoryOfCharComparer.cs (1)
33return Hash.GetFNVHashCode(obj.Span);
src\Compilers\Core\Portable\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);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\Section.cs (2)
178=> Hash.Combine( 180Hash.Combine(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SymbolUsageInfo.cs (1)
71=> Hash.Combine(((int?)ValueUsageInfoOpt)?.GetHashCode() ?? 0, ((int?)TypeOrNamespaceUsageInfoOpt)?.GetHashCode() ?? 0);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferences.cs (5)
373return Hash.Combine(Hash.CombineValues(SymbolSpecifications), 374Hash.Combine(Hash.CombineValues(NamingStyles), 375Hash.CombineValues(NamingRules)));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (7)
210return Hash.Combine(ID.GetHashCode(), 211Hash.Combine(Name.GetHashCode(), 212Hash.Combine(Hash.CombineValues(ApplicableSymbolKindList), 213Hash.Combine(Hash.CombineValues(ApplicableAccessibilityList), 214Hash.CombineValues(RequiredModifierList)))));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.cs (1)
341hashCode = Hash.Combine(ch, hashCode);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ImmutableArrayComparer.cs (1)
23=> Hash.CombineValues(obj);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\InterceptsLocationUtilities.cs (1)
25=> Hash.Combine(ImmutableArrayComparer<byte>.Instance.GetHashCode(ContentHash), Position);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.GetHashCodeVisitor.cs (47)
29_parameterAggregator = (acc, sym) => Hash.Combine(symbolEquivalenceComparer.ParameterEquivalenceComparer.GetHashCode(sym), acc); 47return Hash.Combine(GetNullableAnnotationsHashCode((ITypeSymbol)x), Hash.Combine(typeof(IDynamicTypeSymbol), currentHash)); 81Hash.Combine(GetNullableAnnotationsHashCode(x), 82Hash.Combine(x.Rank, 87=> Hash.Combine(_symbolEquivalenceComparer._assemblyComparer?.GetHashCode(x) ?? 0, currentHash); 92Hash.Combine(x.Name, 99Hash.Combine(x.Name, 100Hash.Combine(x.Locations.FirstOrDefault(), currentHash)); 104=> Hash.Combine(x.Locations.FirstOrDefault(), currentHash); 111currentHash = Hash.Combine(x.MetadataName, currentHash); 114return Hash.Combine(x.Locations.FirstOrDefault(), currentHash); 118Hash.Combine(IsPartialMethodImplementationPart(x), 119Hash.Combine(IsPartialMethodDefinitionPart(x), 120Hash.Combine(x.IsDefinition, 121Hash.Combine(IsConstructedFromSelf(x), 122Hash.Combine(x.Arity, 123Hash.Combine(x.Parameters.Length, 124Hash.Combine(x.Name, currentHash))))))); 141=> CombineHashCodes(x.ContainingAssembly, Hash.Combine(x.Name, currentHash)); 165return Hash.Combine(currentHash, Hash.CombineValues(x.TupleElements)); 171Hash.Combine((int)GetTypeKind(x), 172Hash.Combine(IsConstructedFromSelf(x), 173Hash.Combine(x.Arity, 174Hash.Combine(x.Name, 175Hash.Combine(x.IsAnonymousType, 176Hash.Combine(x.IsUnboundGenericType, 177Hash.Combine(GetNullableAnnotationsHashCode(x), 202return Hash.Combine(p.Name, 203Hash.Combine(p.IsReadOnly, 214return Hash.Combine(x.Name, currentHash); 218Hash.Combine(x.IsGlobalNamespace, 219Hash.Combine(x.Name, 226Hash.Combine(x.IsRefOrOut(), 227Hash.Combine(x.Name, 235Hash.Combine(typeof(IPointerTypeSymbol).GetHashCode(), 242Hash.Combine(x.IsIndexer, 243Hash.Combine(x.Name, 244Hash.Combine(x.Parameters.Length, 245Hash.Combine(IsPartialMethodImplementationPart(x), 246Hash.Combine(IsPartialMethodDefinitionPart(x), 255Hash.Combine(x.Name, 267Hash.Combine(x.Ordinal, 268Hash.Combine((int)x.TypeParameterKind, currentHash)); 292=> Hash.Combine(x.Locations.FirstOrDefault(), currentHash); 295=> Hash.Combine(x.GetHashCode(), currentHash);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.ParameterSymbolEqualityComparer.cs (1)
67Hash.Combine(x.IsRefOrOut(),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SyntaxPath.cs (4)
176=> Hash.Combine(_trackKinds, Hash.Combine(_kind, GetSegmentHashCode())); 183hash = Hash.Combine(Hash.Combine(segment.Kind, segment.Ordinal), hash);