114 references to Hash
Microsoft.CodeAnalysis.CodeStyle (114)
src\Analyzers\Core\Analyzers\Helpers\DiagnosticHelper.cs (2)
381return Hash.Combine( 383Hash.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)
66hashCode = Hash.Combine(value.GetHashCode(), hashCode); 86hashCode = Hash.Combine(value.GetHashCode(), hashCode); 109hashCode = Hash.Combine(value.GetHashCode(), hashCode); 135hashCode = Hash.Combine(value.GetHashCode(), hashCode); 160hashCode = Hash.Combine(stringComparer.GetHashCode(value), hashCode); 180hashCode = Hash.Combine(stringComparer.GetHashCode(value), hashCode); 206int hashCode = Hash.FnvOffsetBias; 210hashCode = unchecked((hashCode ^ data[i]) * Hash.FnvPrime); 227int hashCode = Hash.FnvOffsetBias; 235hashCode = unchecked((hashCode ^ b) * Hash.FnvPrime); 250int hashCode = Hash.FnvOffsetBias; 254hashCode = unchecked((hashCode ^ data[i]) * Hash.FnvPrime); 270return CombineFNVHash(Hash.FnvOffsetBias, data); 295int hashCode = Hash.FnvOffsetBias; 299hashCode = unchecked((hashCode ^ CaseInsensitiveComparison.ToLower(data[i])) * Hash.FnvPrime); 325return CombineFNVHash(Hash.FnvOffsetBias, text); 336int hashCode = Hash.FnvOffsetBias; 350hashCode = unchecked((hashCode ^ text[i]) * Hash.FnvPrime); 367int hashCode = Hash.FnvOffsetBias; 372hashCode = unchecked((hashCode ^ text[i]) * Hash.FnvPrime); 389return Hash.CombineFNVHash(Hash.FnvOffsetBias, ch); 403hashCode = unchecked((hashCode ^ ch) * Hash.FnvPrime); 418return unchecked((hashCode ^ ch) * Hash.FnvPrime); 432hashCode = 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\NamingRule.cs (2)
30=> Hash.Combine(SymbolSpecification.ID.GetHashCode(), Hash.Combine(NamingStyle.ID.GetHashCode(), (int)EnforcementLevel));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferences.cs (5)
397return Hash.Combine(Hash.CombineValues(SymbolSpecifications), 398Hash.Combine(Hash.CombineValues(NamingStyles), 399Hash.CombineValues(Rules.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)
343hashCode = 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)
26=> Hash.Combine(ImmutableArrayComparer<byte>.Instance.GetHashCode(ContentHash), Position);
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);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.GetHashCodeVisitor.cs (49)
32_parameterAggregator = (acc, sym) => Hash.Combine(symbolEquivalenceComparer.ParameterEquivalenceComparer.GetHashCode(sym), acc); 50return Hash.Combine(GetNullableAnnotationsHashCode((ITypeSymbol)x), Hash.Combine(typeof(IDynamicTypeSymbol), currentHash)); 84Hash.Combine(GetNullableAnnotationsHashCode(x), 85Hash.Combine(x.Rank, 90=> Hash.Combine(_symbolEquivalenceComparer._assemblyComparer?.GetHashCode(x) ?? 0, currentHash); 95Hash.Combine(x.Name, 102Hash.Combine(x.Name, 103Hash.Combine(x.Locations.FirstOrDefault(), currentHash)); 107=> Hash.Combine(x.Locations.FirstOrDefault(), currentHash); 114currentHash = Hash.Combine(x.MetadataName, currentHash); 117return Hash.Combine(x.Locations.FirstOrDefault(), currentHash); 121Hash.Combine(IsPartialMethodImplementationPart(x), 122Hash.Combine(IsPartialMethodDefinitionPart(x), 123Hash.Combine(x.IsDefinition, 124Hash.Combine(IsConstructedFromSelf(x), 125Hash.Combine(x.Arity, 126Hash.Combine(x.Parameters.Length, 127Hash.Combine(x.Name, currentHash))))))); 144=> CombineHashCodes(x.ContainingAssembly, Hash.Combine(x.Name, currentHash)); 168return Hash.Combine(currentHash, Hash.CombineValues(x.TupleElements)); 174Hash.Combine((int)GetTypeKind(x), 175Hash.Combine(IsConstructedFromSelf(x), 176Hash.Combine(x.Arity, 177Hash.Combine(x.Name, 178Hash.Combine(x.IsAnonymousType, 179Hash.Combine(x.IsUnboundGenericType, 180Hash.Combine(GetNullableAnnotationsHashCode(x), 205return Hash.Combine(p.Name, 206Hash.Combine(p.IsReadOnly, 217return Hash.Combine(x.Name, currentHash); 221Hash.Combine(x.IsGlobalNamespace, 222Hash.Combine(x.Name, 229Hash.Combine(x.IsRefOrOut(), 230Hash.Combine(x.Name, 238Hash.Combine(typeof(IPointerTypeSymbol).GetHashCode(), 245Hash.Combine(x.IsIndexer, 246Hash.Combine(x.Name, 247Hash.Combine(x.Parameters.Length, 248Hash.Combine(IsPartialPropertyImplementationPart(x), 249Hash.Combine(IsPartialPropertyDefinitionPart(x), 258Hash.Combine(x.Name, 259Hash.Combine(IsPartialEventImplementationPart(x), 260Hash.Combine(IsPartialEventDefinitionPart(x), 272Hash.Combine(x.Ordinal, 273Hash.Combine((int)x.TypeParameterKind, currentHash)); 297=> Hash.Combine(x.Locations.FirstOrDefault(), currentHash); 300=> Hash.Combine(x.GetHashCode(), currentHash);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.ParameterSymbolEqualityComparer.cs (1)
69Hash.Combine(x.IsRefOrOut(),