27 references to Instance
Microsoft.CodeAnalysis.Workspaces (27)
FindSymbols\FindReferences\DependentTypeFinder.cs (1)
49
private static readonly ObjectPool<PooledHashSet<INamedTypeSymbol>> s_symbolSetPool = PooledHashSet<INamedTypeSymbol>.CreatePool(SymbolEquivalenceComparer.
Instance
);
FindSymbols\FindReferences\Finders\AbstractReferenceFinder.cs (1)
592
return symbol1 != null && SymbolEquivalenceComparer.
Instance
.Equals(
FindSymbols\FindReferences\MetadataUnifyingEquivalenceComparer.cs (2)
35
return SymbolEquivalenceComparer.
Instance
.Equals(x, y);
46
return SymbolEquivalenceComparer.
Instance
.GetHashCode(obj);
FindSymbols\SymbolFinder_Callers.cs (1)
47
r => SymbolEquivalenceComparer.
Instance
.Equals(symbol, r.Definition)).FirstOrDefault();
FindSymbols\SymbolFinder_Helpers.cs (1)
134
Contract.ThrowIfFalse(equivalentTypesWithDifferingAssemblies.All(kvp => !SymbolEquivalenceComparer.
Instance
.Equals(kvp.Key.ContainingAssembly, kvp.Value.ContainingAssembly)));
FindSymbols\SymbolFinder_Hierarchy.cs (3)
164
SymbolEquivalenceComparer.
Instance
.Equals(implementation.OriginalDefinition, symbol.OriginalDefinition))
174
return builder.Distinct(SymbolEquivalenceComparer.
Instance
).ToImmutableArray();
371
return results.Distinct(SymbolEquivalenceComparer.
Instance
).ToImmutableArray();
Shared\Extensions\IFindReferencesResultExtensions.cs (1)
106
let aliasLocations = r.Locations.Where(loc => SymbolEquivalenceComparer.
Instance
.Equals(loc.Alias, aliasSymbol)).ToImmutableArray()
Shared\Extensions\ITypeSymbolExtensions.cs (2)
88
SymbolEquivalenceComparer.
Instance
.Equals(i.OriginalDefinition, originalInterfaceType));
146
where SymbolEquivalenceComparer.
Instance
.Equals(explicitInterfaceMethod, constructedInterfaceMember)
Shared\Extensions\SemanticModelExtensions.cs (1)
55
var comparer = SymbolEquivalenceComparer.
Instance
.ParameterEquivalenceComparer;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.cs (8)
103
symbols ??= new HashSet<INamedTypeSymbol>(SymbolEquivalenceComparer.
Instance
);
164
return type.GetBaseTypesAndThis().Concat(type.AllInterfaces).Contains(t => SymbolEquivalenceComparer.
Instance
.Equals(t, baseType));
172
return type.GetBaseTypesAndThis().Contains(t => SymbolEquivalenceComparer.
Instance
.Equals(t, baseType));
183
if (SymbolEquivalenceComparer.
Instance
.Equals(type, originalBaseType))
189
return baseTypes.Contains(t => SymbolEquivalenceComparer.
Instance
.Equals(t.OriginalDefinition, originalBaseType));
205
if (SymbolEquivalenceComparer.
Instance
.Equals(currentBaseType.OriginalDefinition, originalBaseType))
220
return type.AllInterfaces.Any(static (t, originalInterfaceType) => SymbolEquivalenceComparer.
Instance
.Equals(t.OriginalDefinition, originalInterfaceType), originalInterfaceType);
226
return type.AllInterfaces.Contains(t => SymbolEquivalenceComparer.
Instance
.Equals(t, interfaceType));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticEquivalence.cs (1)
143
return SymbolEquivalenceComparer.
Instance
.Equals(info1.Symbol, info2.Symbol);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.AliasSymbolKey.cs (1)
69
SymbolEquivalenceComparer.
Instance
.Equals(aliasSymbol.Target, target))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (1)
378
: SymbolEquivalenceComparer.
Instance
;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AbstractSpeculationAnalyzer.cs (1)
487
return SymbolEquivalenceComparer.
Instance
.Equals(symbol, newSymbol);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SignatureComparer.cs (1)
15
public static readonly SignatureComparer Instance = new(SymbolEquivalenceComparer.
Instance
);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationArrayTypeSymbol.cs (1)
68
=> SymbolEquivalenceComparer.
Instance
.Equals(this, other);