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