1 instantiation of ReferenceEqualityComparer
Microsoft.CodeAnalysis.Workspaces (1)
src\Compilers\Core\Portable\InternalUtilities\ReferenceEqualityComparer.cs (1)
15public static readonly ReferenceEqualityComparer Instance = new();
17 references to ReferenceEqualityComparer
Microsoft.CodeAnalysis.Workspaces (17)
ExtensionManager\AbstractExtensionManager.cs (2)
12private readonly ConcurrentSet<object> _disabledProviders = new(ReferenceEqualityComparer.Instance); 13private readonly ConcurrentSet<object> _ignoredProviders = new(ReferenceEqualityComparer.Instance);
src\Compilers\Core\Portable\InternalUtilities\ReferenceEqualityComparer.cs (2)
15public static readonly ReferenceEqualityComparer Instance = new(); 28return ReferenceEqualityComparer.GetHashCode(a);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Mef\MefLanguageServices.cs (2)
14using ReferenceEqualityComparer = Roslyn.Utilities.ReferenceEqualityComparer; 30private readonly HashSet<IDisposable> _ownedDisposableServices = new(ReferenceEqualityComparer.Instance);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Mef\MefWorkspaceServices.cs (2)
15using ReferenceEqualityComparer = Roslyn.Utilities.ReferenceEqualityComparer; 32private readonly HashSet<IDisposable> _ownedDisposableServices = new(ReferenceEqualityComparer.Instance);
Utilities\ReferenceHolder`1.cs (2)
41return new ReferenceHolder<T>(new WeakReference<T>(value), ReferenceEqualityComparer.GetHashCode(value)); 89return ReferenceEqualityComparer.GetHashCode(_strongReference);
Workspace\Solution\SolutionCompilationState.cs (3)
23using ReferenceEqualityComparer = Roslyn.Utilities.ReferenceEqualityComparer; 762var addedReferences = stateChange.NewProjectState.AnalyzerReferences.Except<AnalyzerReference>(stateChange.OldProjectState.AnalyzerReferences, ReferenceEqualityComparer.Instance).ToImmutableArray(); 763var removedReferences = stateChange.OldProjectState.AnalyzerReferences.Except<AnalyzerReference>(stateChange.NewProjectState.AnalyzerReferences, ReferenceEqualityComparer.Instance).ToImmutableArray();
Workspace\Solution\SolutionCompilationState.RootedSymbolSet.cs (4)
8using ReferenceEqualityComparer = Roslyn.Utilities.ReferenceEqualityComparer; 59/// cref="ReferenceEqualityComparer.GetHashCode(object?)"/> so that it can be binary searched efficiently. 83secondarySymbols.Add((ReferenceEqualityComparer.GetHashCode(symbol), symbol, MetadataReferenceInfo.From(reference))); 119var symbolHash = ReferenceEqualityComparer.GetHashCode(symbol);