36 references to Instance
Microsoft.CodeAnalysis (36)
CodeGen\ILBuilder.cs (1)
81
_labelInfos = new SmallDictionary<object, LabelInfo>(ReferenceEqualityComparer.
Instance
);
CodeGen\ItemTokenMap.cs (1)
22
private readonly ConcurrentDictionary<T, uint> _itemToToken = new ConcurrentDictionary<T, uint>(ReferenceEqualityComparer.
Instance
);
CodeGen\LocalSlotManager.cs (1)
97
map = new Dictionary<ILocalSymbolInternal, LocalDefinition>(ReferenceEqualityComparer.
Instance
);
Compilation\Compilation.cs (3)
1209
ref _getTypeCache, static () => new ConcurrentCache<string, INamedTypeSymbol?>(50, ReferenceEqualityComparer.
Instance
));
1240
ref _getTypesCache, static () => new ConcurrentCache<string, ImmutableArray<INamedTypeSymbol>>(50, ReferenceEqualityComparer.
Instance
));
1248
|| Enumerable.SequenceEqual(addedArray, val, ReferenceEqualityComparer.
Instance
));
DiagnosticAnalyzer\AnalyzerDriver.cs (1)
382
_diagnosticsProcessedForProgrammaticSuppressions = HasDiagnosticSuppressors ? new ConcurrentSet<Diagnostic>(ReferenceEqualityComparer.
Instance
) : null;
DiagnosticAnalyzer\AnalyzerManager.AnalyzerExecutionContext.cs (1)
25
private static ImmutableDictionary<LocalizableString, Exception?> s_localizableStringToException = ImmutableDictionary<LocalizableString, Exception?>.Empty.WithComparers(Roslyn.Utilities.ReferenceEqualityComparer.
Instance
);
Emit\CommonPEModuleBuilder.cs (2)
66
_methodBodyMap = new ConcurrentDictionary<IMethodSymbolInternal, Cci.IMethodBody>(ReferenceEqualityComparer.
Instance
);
869
new ConcurrentDictionary<TNamedTypeSymbol, SynthesizedDefinitions>(ReferenceEqualityComparer.
Instance
);
Emit\EditAndContinue\DeltaMetadataWriter.cs (6)
103
_deletedTypeMembers = new Dictionary<ITypeDefinition, ImmutableArray<IMethodDefinition>>(ReferenceEqualityComparer.
Instance
);
121
_existingParameterDefs = new Dictionary<IParameterDefinition, int>(ReferenceEqualityComparer.
Instance
);
497
var result = new Dictionary<ITypeDefinition, ArrayBuilder<IMethodDefinition>>(ReferenceEqualityComparer.
Instance
);
498
var typesUsedByDeletedMembers = new Dictionary<ITypeDefinition, DeletedSourceTypeDefinition>(ReferenceEqualityComparer.
Instance
);
1543
: base(lastRowId, ReferenceEqualityComparer.
Instance
)
1727
: base(lastRowId, ReferenceEqualityComparer.
Instance
)
Emit\NoPia\EmbeddedTypesManager.cs (5)
70
public readonly ConcurrentDictionary<TNamedTypeSymbol, TEmbeddedType> EmbeddedTypesMap = new ConcurrentDictionary<TNamedTypeSymbol, TEmbeddedType>(ReferenceEqualityComparer.
Instance
);
71
public readonly ConcurrentDictionary<TFieldSymbol, TEmbeddedField> EmbeddedFieldsMap = new ConcurrentDictionary<TFieldSymbol, TEmbeddedField>(ReferenceEqualityComparer.
Instance
);
72
public readonly ConcurrentDictionary<TMethodSymbol, TEmbeddedMethod> EmbeddedMethodsMap = new ConcurrentDictionary<TMethodSymbol, TEmbeddedMethod>(ReferenceEqualityComparer.
Instance
);
73
public readonly ConcurrentDictionary<TPropertySymbol, TEmbeddedProperty> EmbeddedPropertiesMap = new ConcurrentDictionary<TPropertySymbol, TEmbeddedProperty>(ReferenceEqualityComparer.
Instance
);
74
public readonly ConcurrentDictionary<TEventSymbol, TEmbeddedEvent> EmbeddedEventsMap = new ConcurrentDictionary<TEventSymbol, TEmbeddedEvent>(ReferenceEqualityComparer.
Instance
);
MetadataReference\AssemblyIdentity.DisplayName.cs (1)
175
new ConcurrentCache<string, (AssemblyIdentity? identity, AssemblyIdentityParts parts)>(1024, ReferenceEqualityComparer.
Instance
);
NativePdbWriter\PdbWriter.cs (1)
50
_qualifiedNameCache = new Dictionary<object, string>(ReferenceEqualityComparer.
Instance
);
PEWriter\FullMetadataWriter.cs (4)
101
_fieldDefIndex = new Dictionary<ITypeDefinition, int>(numTypeDefsGuess, ReferenceEqualityComparer.
Instance
);
102
_methodDefIndex = new Dictionary<ITypeDefinition, int>(numTypeDefsGuess, ReferenceEqualityComparer.
Instance
);
103
_parameterListIndex = new SegmentedDictionary<IMethodDefinition, int>(numMethods, ReferenceEqualityComparer.
Instance
);
437
_index = new SegmentedDictionary<T, int>(capacity, ReferenceEqualityComparer.
Instance
);
PEWriter\MetadataWriter.cs (6)
114
_signatureIndex = new Dictionary<ISignature, KeyValuePair<BlobHandle, ImmutableArray<byte>>>(module.HintNumberOfMethodDefinitions, ReferenceEqualityComparer.
Instance
); //ignores field signatures
440
private readonly Dictionary<ITypeReference, BlobHandle> _typeSpecSignatureIndex = new Dictionary<ITypeReference, BlobHandle>(ReferenceEqualityComparer.
Instance
);
443
private readonly Dictionary<IFieldReference, BlobHandle> _fieldSignatureIndex = new Dictionary<IFieldReference, BlobHandle>(ReferenceEqualityComparer.
Instance
);
450
private readonly Dictionary<IGenericMethodInstanceReference, BlobHandle> _methodInstanceSignatureIndex = new Dictionary<IGenericMethodInstanceReference, BlobHandle>(ReferenceEqualityComparer.
Instance
);
4274
: this(writer, new Dictionary<ITypeReference, int>(ReferenceEqualityComparer.
Instance
), lastRowId)
4304
_instanceIndex = new Dictionary<T, int>(ReferenceEqualityComparer.
Instance
);
SourceGeneration\IncrementalContexts.cs (1)
57
.WithComparer(ReferenceEqualityComparer.
Instance
)
SourceGeneration\Nodes\PredicateSyntaxStrategy.cs (1)
88
if (state != EntryState.Modified || !_filterTable.TryModifyEntries(nodes, Roslyn.Utilities.ReferenceEqualityComparer.
Instance
, stopwatch.Elapsed, noInputStepsStepInfo, state, out entry))
SourceGeneration\Nodes\SharedInputNodes.cs (1)
20
public static readonly InputNode<CompilationOptions> CompilationOptions = new(b => ImmutableArray.Create(b.Compilation.Options), ReferenceEqualityComparer.
Instance
);