7 instantiations of ImmutableSegmentedDictionary
Microsoft.CodeAnalysis (7)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (2)
75public static readonly ImmutableSegmentedDictionary<TKey, TValue> Empty = new(new SegmentedDictionary<TKey, TValue>()); 285return new ImmutableSegmentedDictionary<TKey, TValue>(new SegmentedDictionary<TKey, TValue>(keyComparer));
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+PrivateMarshal.cs (4)
26return new ImmutableSegmentedDictionary<TKey, TValue>(dictionary); 35return new ImmutableSegmentedDictionary<TKey, TValue>(dictionary); 44return new ImmutableSegmentedDictionary<TKey, TValue>(dictionary); 53=> dictionary is not null ? new ImmutableSegmentedDictionary<TKey, TValue>(dictionary) : default;
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
231_dictionary = new ImmutableSegmentedDictionary<TKey, TValue>(ReadOnlyDictionary);
244 references to ImmutableSegmentedDictionary
Microsoft.CodeAnalysis (231)
Collections\DictionaryExtensions.cs (2)
92/// Converts the passed in dictionary to an <see cref="ImmutableSegmentedDictionary{TKey, TValue}"/>, where all 97public static ImmutableSegmentedDictionary<K, ImmutableArray<V>> ToImmutableSegmentedDictionaryAndFree<K, V>(this PooledDictionary<K, ArrayBuilder<V>> dictionary)
DiagnosticAnalyzer\AnalyzerDriver.cs (11)
155private ImmutableSegmentedDictionary<DiagnosticAnalyzer, SemaphoreSlim> _lazyAnalyzerGateMap; 156private ImmutableSegmentedDictionary<DiagnosticAnalyzer, SemaphoreSlim> AnalyzerGateMap 165private ImmutableSegmentedDictionary<DiagnosticAnalyzer, GeneratedCodeAnalysisFlags> _lazyGeneratedCodeAnalysisFlagsMap; 170private ImmutableSegmentedDictionary<DiagnosticAnalyzer, GeneratedCodeAnalysisFlags> GeneratedCodeAnalysisFlagsMap 382_lazyAnalyzerGateMap = ImmutableSegmentedDictionary<DiagnosticAnalyzer, SemaphoreSlim>.Empty; 565ImmutableSegmentedDictionary<DiagnosticAnalyzer, GeneratedCodeAnalysisFlags> generatedCodeAnalysisFlagsMap, 582private static bool ComputeShouldTreatAllCodeAsNonGeneratedCode(ImmutableHashSet<DiagnosticAnalyzer> analyzers, ImmutableSegmentedDictionary<DiagnosticAnalyzer, GeneratedCodeAnalysisFlags> generatedCodeAnalysisFlagsMap) 603ImmutableSegmentedDictionary<DiagnosticAnalyzer, GeneratedCodeAnalysisFlags> generatedCodeAnalysisFlagsMap, 2223private static async Task<ImmutableSegmentedDictionary<DiagnosticAnalyzer, SemaphoreSlim>> CreateAnalyzerGateMapAsync( 2248private static async Task<ImmutableSegmentedDictionary<DiagnosticAnalyzer, GeneratedCodeAnalysisFlags>> CreateGeneratedCodeAnalysisFlagsMapAsync( 2762var operationActionsByKind = groupedActionsForAnalyzer.OperationActionsByAnalyzerAndKind;
DiagnosticAnalyzer\AnalyzerDriver.GroupedAnalyzerActions.cs (7)
23ImmutableSegmentedDictionary<TLanguageKindEnum, ImmutableArray<DiagnosticAnalyzer>>.Empty, 28ImmutableSegmentedDictionary<TLanguageKindEnum, ImmutableArray<DiagnosticAnalyzer>> analyzersByKind, 38public ImmutableSegmentedDictionary<TLanguageKindEnum, ImmutableArray<DiagnosticAnalyzer>> AnalyzersByKind { get; } 61var analyzersByKind = CreateAnalyzersByKind(groupedActionsAndAnalyzers); 72var analyzersByKind = CreateAnalyzersByKind(groups); 89var analyzersByKind = CreateAnalyzersByKind(newGroupedActions); 93private static ImmutableSegmentedDictionary<TLanguageKindEnum, ImmutableArray<DiagnosticAnalyzer>> CreateAnalyzersByKind(ImmutableArray<(DiagnosticAnalyzer, GroupedAnalyzerActionsForAnalyzer)> groupedActionsAndAnalyzers)
DiagnosticAnalyzer\AnalyzerDriver.GroupedAnalyzerActionsForAnalyzer.cs (4)
19private ImmutableSegmentedDictionary<TLanguageKindEnum, ImmutableArray<SyntaxNodeAnalyzerAction<TLanguageKindEnum>>> _lazyNodeActionsByKind; 20private ImmutableSegmentedDictionary<OperationKind, ImmutableArray<OperationAnalyzerAction>> _lazyOperationActionsByKind; 78public ImmutableSegmentedDictionary<TLanguageKindEnum, ImmutableArray<SyntaxNodeAnalyzerAction<TLanguageKindEnum>>> NodeActionsByAnalyzerAndKind 99public ImmutableSegmentedDictionary<OperationKind, ImmutableArray<OperationAnalyzerAction>> OperationActionsByAnalyzerAndKind
DiagnosticAnalyzer\AnalyzerExecutor.cs (9)
782var executableNodeActionsByKind = GetNodeActionsByKind(ephemeralActions); 973internal static ImmutableSegmentedDictionary<TLanguageKindEnum, ImmutableArray<SyntaxNodeAnalyzerAction<TLanguageKindEnum>>> GetNodeActionsByKind<TLanguageKindEnum>( 978return ImmutableSegmentedDictionary<TLanguageKindEnum, ImmutableArray<SyntaxNodeAnalyzerAction<TLanguageKindEnum>>>.Empty; 997ImmutableSegmentedDictionary<TLanguageKindEnum, ImmutableArray<SyntaxNodeAnalyzerAction<TLanguageKindEnum>>> nodeActionsByKind, 1032ImmutableSegmentedDictionary<TLanguageKindEnum, ImmutableArray<SyntaxNodeAnalyzerAction<TLanguageKindEnum>>> nodeActionsByKind, 1071internal static ImmutableSegmentedDictionary<OperationKind, ImmutableArray<OperationAnalyzerAction>> GetOperationActionsByKind( 1075return ImmutableSegmentedDictionary<OperationKind, ImmutableArray<OperationAnalyzerAction>>.Empty; 1098ImmutableSegmentedDictionary<OperationKind, ImmutableArray<OperationAnalyzerAction>> operationActionsByKind, 1131ImmutableSegmentedDictionary<OperationKind, ImmutableArray<OperationAnalyzerAction>> operationActionsByKind,
Emit\EditAndContinue\EmitBaseline.cs (2)
193synthesizedMembers: ImmutableSegmentedDictionary<ISymbolInternal, ImmutableArray<ISymbolInternal>>.Empty, 194deletedMembers: ImmutableSegmentedDictionary<ISymbolInternal, ImmutableArray<ISymbolInternal>>.Empty,
Emit\EditAndContinue\SymbolChanges.cs (1)
470elementSelector: static e => e.Value.ToImmutableAndFree()) ?? ImmutableSegmentedDictionary<ISymbolInternal, ImmutableArray<ISymbolInternal>>.Empty;
Emit\EditAndContinue\SymbolMatcher.cs (3)
108private ImmutableSegmentedDictionary<AnonymousTypeKey, AnonymousTypeValue> MapAnonymousTypes(IReadOnlyDictionary<AnonymousTypeKey, AnonymousTypeValue> anonymousTypeMap) 122private ImmutableSegmentedDictionary<SynthesizedDelegateKey, SynthesizedDelegateValue> MapAnonymousDelegates(IReadOnlyDictionary<SynthesizedDelegateKey, SynthesizedDelegateValue> anonymousDelegates) 136private ImmutableSegmentedDictionary<AnonymousDelegateWithIndexedNamePartialKey, ImmutableArray<AnonymousTypeValue>> MapAnonymousDelegatesWithIndexedNames(
Emit\EditAndContinue\SynthesizedTypeMaps.cs (9)
11ImmutableSegmentedDictionary<AnonymousTypeKey, AnonymousTypeValue>? anonymousTypeMap, 12ImmutableSegmentedDictionary<SynthesizedDelegateKey, SynthesizedDelegateValue>? anonymousDelegates, 13ImmutableSegmentedDictionary<AnonymousDelegateWithIndexedNamePartialKey, ImmutableArray<AnonymousTypeValue>>? anonymousDelegatesWithIndexedNames) 23public ImmutableSegmentedDictionary<AnonymousTypeKey, AnonymousTypeValue> AnonymousTypes { get; } 24= anonymousTypeMap ?? ImmutableSegmentedDictionary<AnonymousTypeKey, AnonymousTypeValue>.Empty; 30public ImmutableSegmentedDictionary<SynthesizedDelegateKey, SynthesizedDelegateValue> AnonymousDelegates { get; } 31= anonymousDelegates ?? ImmutableSegmentedDictionary<SynthesizedDelegateKey, SynthesizedDelegateValue>.Empty; 37public ImmutableSegmentedDictionary<AnonymousDelegateWithIndexedNamePartialKey, ImmutableArray<AnonymousTypeValue>> AnonymousDelegatesWithIndexedNames { get; } 38= anonymousDelegatesWithIndexedNames ?? ImmutableSegmentedDictionary<AnonymousDelegateWithIndexedNamePartialKey, ImmutableArray<AnonymousTypeValue>>.Empty;
SourceGeneration\Nodes\StateTableStore.cs (4)
12private readonly ImmutableSegmentedDictionary<object, IStateTable> _tables; 14public static readonly StateTableStore Empty = new StateTableStore(ImmutableSegmentedDictionary<object, IStateTable>.Empty); 16private StateTableStore(ImmutableSegmentedDictionary<object, IStateTable> tables) 39private readonly ImmutableSegmentedDictionary<object, IStateTable>.Builder _tableBuilder = ImmutableSegmentedDictionary.CreateBuilder<object, IStateTable>();
src\Dependencies\Collections\RoslynImmutableInterlocked.cs (62)
276public static bool Update<TKey, TValue>(ref ImmutableSegmentedDictionary<TKey, TValue> location, Func<ImmutableSegmentedDictionary<TKey, TValue>, ImmutableSegmentedDictionary<TKey, TValue>> transformer) 282var oldValue = ImmutableSegmentedDictionary<TKey, TValue>.PrivateMarshal.VolatileRead(in location); 285var newValue = transformer(oldValue); 292var interlockedResult = InterlockedCompareExchange(ref location, newValue, oldValue); 319public static bool Update<TKey, TValue, TArg>(ref ImmutableSegmentedDictionary<TKey, TValue> location, Func<ImmutableSegmentedDictionary<TKey, TValue>, TArg, ImmutableSegmentedDictionary<TKey, TValue>> transformer, TArg transformerArgument) 325var oldValue = ImmutableSegmentedDictionary<TKey, TValue>.PrivateMarshal.VolatileRead(in location); 328var newValue = transformer(oldValue, transformerArgument); 335var interlockedResult = InterlockedCompareExchange(ref location, newValue, oldValue); 352public static ImmutableSegmentedDictionary<TKey, TValue> InterlockedExchange<TKey, TValue>(ref ImmutableSegmentedDictionary<TKey, TValue> location, ImmutableSegmentedDictionary<TKey, TValue> value) 355return ImmutableSegmentedDictionary<TKey, TValue>.PrivateMarshal.InterlockedExchange(ref location, value); 368public static ImmutableSegmentedDictionary<TKey, TValue> InterlockedCompareExchange<TKey, TValue>(ref ImmutableSegmentedDictionary<TKey, TValue> location, ImmutableSegmentedDictionary<TKey, TValue> value, ImmutableSegmentedDictionary<TKey, TValue> comparand) 371return ImmutableSegmentedDictionary<TKey, TValue>.PrivateMarshal.InterlockedCompareExchange(ref location, value, comparand); 384public static bool InterlockedInitialize<TKey, TValue>(ref ImmutableSegmentedDictionary<TKey, TValue> location, ImmutableSegmentedDictionary<TKey, TValue> value) 387return InterlockedCompareExchange(ref location, value, default(ImmutableSegmentedDictionary<TKey, TValue>)).IsDefault; 391public static TValue GetOrAdd<TKey, TValue, TArg>(ref ImmutableSegmentedDictionary<TKey, TValue> location, TKey key, Func<TKey, TArg, TValue> valueFactory, TArg factoryArgument) 397var map = ImmutableSegmentedDictionary<TKey, TValue>.PrivateMarshal.VolatileRead(in location); 411public static TValue GetOrAdd<TKey, TValue>(ref ImmutableSegmentedDictionary<TKey, TValue> location, TKey key, Func<TKey, TValue> valueFactory) 417var map = ImmutableSegmentedDictionary<TKey, TValue>.PrivateMarshal.VolatileRead(in location); 431public static TValue GetOrAdd<TKey, TValue>(ref ImmutableSegmentedDictionary<TKey, TValue> location, TKey key, TValue value) 434var priorCollection = ImmutableSegmentedDictionary<TKey, TValue>.PrivateMarshal.VolatileRead(in location); 445var updatedCollection = priorCollection.Add(key, value); 446var interlockedResult = InterlockedCompareExchange(ref location, updatedCollection, priorCollection); 459public static TValue AddOrUpdate<TKey, TValue>(ref ImmutableSegmentedDictionary<TKey, TValue> location, TKey key, Func<TKey, TValue> addValueFactory, Func<TKey, TValue, TValue> updateValueFactory) 468var priorCollection = ImmutableSegmentedDictionary<TKey, TValue>.PrivateMarshal.VolatileRead(in location); 483var updatedCollection = priorCollection.SetItem(key, newValue); 484var interlockedResult = InterlockedCompareExchange(ref location, updatedCollection, priorCollection); 497public static TValue AddOrUpdate<TKey, TValue>(ref ImmutableSegmentedDictionary<TKey, TValue> location, TKey key, TValue addValue, Func<TKey, TValue, TValue> updateValueFactory) 504var priorCollection = ImmutableSegmentedDictionary<TKey, TValue>.PrivateMarshal.VolatileRead(in location); 519var updatedCollection = priorCollection.SetItem(key, newValue); 520var interlockedResult = InterlockedCompareExchange(ref location, updatedCollection, priorCollection); 533public static bool TryAdd<TKey, TValue>(ref ImmutableSegmentedDictionary<TKey, TValue> location, TKey key, TValue value) 536var priorCollection = ImmutableSegmentedDictionary<TKey, TValue>.PrivateMarshal.VolatileRead(in location); 547var updatedCollection = priorCollection.Add(key, value); 548var interlockedResult = InterlockedCompareExchange(ref location, updatedCollection, priorCollection); 559public static bool TryUpdate<TKey, TValue>(ref ImmutableSegmentedDictionary<TKey, TValue> location, TKey key, TValue newValue, TValue comparisonValue) 563var priorCollection = ImmutableSegmentedDictionary<TKey, TValue>.PrivateMarshal.VolatileRead(in location); 575var updatedCollection = priorCollection.SetItem(key, newValue); 576var interlockedResult = InterlockedCompareExchange(ref location, updatedCollection, priorCollection); 587public static bool TryRemove<TKey, TValue>(ref ImmutableSegmentedDictionary<TKey, TValue> location, TKey key, [MaybeNullWhen(false)] out TValue value) 590var priorCollection = ImmutableSegmentedDictionary<TKey, TValue>.PrivateMarshal.VolatileRead(in location); 601var updatedCollection = priorCollection.Remove(key); 602var interlockedResult = InterlockedCompareExchange(ref location, updatedCollection, priorCollection);
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary.cs (21)
19public static ImmutableSegmentedDictionary<TKey, TValue> Create<TKey, TValue>() 21=> ImmutableSegmentedDictionary<TKey, TValue>.Empty; 23public static ImmutableSegmentedDictionary<TKey, TValue> Create<TKey, TValue>(IEqualityComparer<TKey>? keyComparer) 25=> ImmutableSegmentedDictionary<TKey, TValue>.Empty.WithComparer(keyComparer); 27public static ImmutableSegmentedDictionary<TKey, TValue>.Builder CreateBuilder<TKey, TValue>() 31public static ImmutableSegmentedDictionary<TKey, TValue>.Builder CreateBuilder<TKey, TValue>(IEqualityComparer<TKey>? keyComparer) 35public static ImmutableSegmentedDictionary<TKey, TValue> CreateRange<TKey, TValue>(IEnumerable<KeyValuePair<TKey, TValue>> items) 37=> ImmutableSegmentedDictionary<TKey, TValue>.Empty.AddRange(items); 39public static ImmutableSegmentedDictionary<TKey, TValue> CreateRange<TKey, TValue>(IEqualityComparer<TKey>? keyComparer, IEnumerable<KeyValuePair<TKey, TValue>> items) 41=> ImmutableSegmentedDictionary<TKey, TValue>.Empty.WithComparer(keyComparer).AddRange(items); 43public static ImmutableSegmentedDictionary<TKey, TValue> ToImmutableSegmentedDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> items) 47public static ImmutableSegmentedDictionary<TKey, TValue> ToImmutableSegmentedDictionary<TKey, TValue>(this ImmutableSegmentedDictionary<TKey, TValue>.Builder builder) 56public static ImmutableSegmentedDictionary<TKey, TValue> ToImmutableSegmentedDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> items, IEqualityComparer<TKey>? keyComparer) 62if (items is ImmutableSegmentedDictionary<TKey, TValue> existingDictionary) 65return ImmutableSegmentedDictionary<TKey, TValue>.Empty.WithComparer(keyComparer).AddRange(items); 68public static ImmutableSegmentedDictionary<TKey, TValue> ToImmutableSegmentedDictionary<TSource, TKey, TValue>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TValue> elementSelector) 72public static ImmutableSegmentedDictionary<TKey, TValue> ToImmutableSegmentedDictionary<TSource, TKey, TValue>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TValue> elementSelector, IEqualityComparer<TKey>? keyComparer) 82return ImmutableSegmentedDictionary<TKey, TValue>.Empty.WithComparer(keyComparer) 86public static ImmutableSegmentedDictionary<TKey, TSource> ToImmutableSegmentedDictionary<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector) 90public static ImmutableSegmentedDictionary<TKey, TSource> ToImmutableSegmentedDictionary<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, IEqualityComparer<TKey>? keyComparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2.cs (35)
19/// <para>There are different scenarios best for <see cref="ImmutableSegmentedDictionary{TKey, TValue}"/> and others 22/// <para>In general, <see cref="ImmutableSegmentedDictionary{TKey, TValue}"/> is applicable in scenarios most like 28/// <see cref="ImmutableSegmentedDictionary{TKey, TValue}"/>:</para> 33/// <description><see cref="ImmutableSegmentedDictionary{TKey, TValue}"/> Complexity</description> 72internal readonly partial struct ImmutableSegmentedDictionary<TKey, TValue> : IImmutableDictionary<TKey, TValue>, IDictionary<TKey, TValue>, IReadOnlyDictionary<TKey, TValue>, IDictionary, IEquatable<ImmutableSegmentedDictionary<TKey, TValue>> 75public static readonly ImmutableSegmentedDictionary<TKey, TValue> Empty = new(new SegmentedDictionary<TKey, TValue>()); 134public static bool operator ==(ImmutableSegmentedDictionary<TKey, TValue> left, ImmutableSegmentedDictionary<TKey, TValue> right) 137public static bool operator !=(ImmutableSegmentedDictionary<TKey, TValue> left, ImmutableSegmentedDictionary<TKey, TValue> right) 140public static bool operator ==(ImmutableSegmentedDictionary<TKey, TValue>? left, ImmutableSegmentedDictionary<TKey, TValue>? right) 143public static bool operator !=(ImmutableSegmentedDictionary<TKey, TValue>? left, ImmutableSegmentedDictionary<TKey, TValue>? right) 146public ImmutableSegmentedDictionary<TKey, TValue> Add(TKey key, TValue value) 148var self = this; 157public ImmutableSegmentedDictionary<TKey, TValue> AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs) 159var self = this; 162if (self.IsEmpty && TryCastToImmutableSegmentedDictionary(pairs, out var other) && self.KeyComparer == other.KeyComparer) 172public ImmutableSegmentedDictionary<TKey, TValue> Clear() 174var self = this; 198public ImmutableSegmentedDictionary<TKey, TValue> Remove(TKey key) 200var self = this; 209public ImmutableSegmentedDictionary<TKey, TValue> RemoveRange(IEnumerable<TKey> keys) 219public ImmutableSegmentedDictionary<TKey, TValue> SetItem(TKey key, TValue value) 221var self = this; 232public ImmutableSegmentedDictionary<TKey, TValue> SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items) 248var self = this; 267public ImmutableSegmentedDictionary<TKey, TValue> WithComparer(IEqualityComparer<TKey>? keyComparer) 271var self = this; 305return obj is ImmutableSegmentedDictionary<TKey, TValue> other 309public bool Equals(ImmutableSegmentedDictionary<TKey, TValue> other) 374private static bool TryCastToImmutableSegmentedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> pairs, out ImmutableSegmentedDictionary<TKey, TValue> other) 376if (pairs is ImmutableSegmentedDictionary<TKey, TValue> dictionary) 382if (pairs is ImmutableSegmentedDictionary<TKey, TValue>.Builder builder)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder.cs (2)
24internal Builder(ImmutableSegmentedDictionary<TKey, TValue> dictionary) 122public ImmutableSegmentedDictionary<TKey, TValue> ToImmutable()
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+KeyCollection.cs (3)
20private readonly ImmutableSegmentedDictionary<TKey, TValue>.Builder _dictionary; 22internal KeyCollection(ImmutableSegmentedDictionary<TKey, TValue>.Builder dictionary) 48public ImmutableSegmentedDictionary<TKey, TValue>.KeyCollection.Enumerator GetEnumerator()
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+PrivateMarshal.cs (1)
18/// <inheritdoc cref="SegmentedCollectionsMarshal.GetValueRefOrNullRef{TKey, TValue}(ImmutableSegmentedDictionary{TKey, TValue}.Builder, TKey)"/>
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Builder+ValueCollection.cs (3)
20private readonly ImmutableSegmentedDictionary<TKey, TValue>.Builder _dictionary; 22internal ValueCollection(ImmutableSegmentedDictionary<TKey, TValue>.Builder dictionary) 48public ImmutableSegmentedDictionary<TKey, TValue>.ValueCollection.Enumerator GetEnumerator()
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+Enumerator.cs (1)
40/// <see cref="ImmutableSegmentedDictionary{TKey, TValue}"/>.
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (2)
17private readonly ImmutableSegmentedDictionary<TKey, TValue> _dictionary; 19internal KeyCollection(ImmutableSegmentedDictionary<TKey, TValue> dictionary)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection+Enumerator.cs (2)
18private ImmutableSegmentedDictionary<TKey, TValue>.Enumerator _enumerator; 20internal Enumerator(ImmutableSegmentedDictionary<TKey, TValue>.Enumerator enumerator)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+PrivateMarshal.cs (14)
20internal static ImmutableSegmentedDictionary<TKey, TValue> VolatileRead(in ImmutableSegmentedDictionary<TKey, TValue> location) 29internal static ImmutableSegmentedDictionary<TKey, TValue> InterlockedExchange(ref ImmutableSegmentedDictionary<TKey, TValue> location, ImmutableSegmentedDictionary<TKey, TValue> value) 38internal static ImmutableSegmentedDictionary<TKey, TValue> InterlockedCompareExchange(ref ImmutableSegmentedDictionary<TKey, TValue> location, ImmutableSegmentedDictionary<TKey, TValue> value, ImmutableSegmentedDictionary<TKey, TValue> comparand) 47/// <inheritdoc cref="SegmentedCollectionsMarshal.GetValueRefOrNullRef{TKey, TValue}(ImmutableSegmentedDictionary{TKey, TValue}, TKey)"/> 48public static ref readonly TValue FindValue(ImmutableSegmentedDictionary<TKey, TValue> dictionary, TKey key) 52internal static ImmutableSegmentedDictionary<TKey, TValue> AsImmutableSegmentedDictionary(SegmentedDictionary<TKey, TValue>? dictionary) 55/// <inheritdoc cref="SegmentedCollectionsMarshal.AsSegmentedDictionary{TKey, TValue}(ImmutableSegmentedDictionary{TKey, TValue})"/> 56internal static SegmentedDictionary<TKey, TValue>? AsSegmentedDictionary(ImmutableSegmentedDictionary<TKey, TValue> dictionary)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (4)
21private ImmutableSegmentedDictionary<TKey, TValue> _dictionary; 29internal ValueBuilder(ImmutableSegmentedDictionary<TKey, TValue> dictionary) 100var originalDictionary = RoslynImmutableInterlocked.InterlockedExchange(ref _dictionary, default); 229public ImmutableSegmentedDictionary<TKey, TValue> ToImmutable()
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (2)
17private readonly ImmutableSegmentedDictionary<TKey, TValue> _dictionary; 19internal ValueCollection(ImmutableSegmentedDictionary<TKey, TValue> dictionary)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection+Enumerator.cs (2)
18private ImmutableSegmentedDictionary<TKey, TValue>.Enumerator _enumerator; 20internal Enumerator(ImmutableSegmentedDictionary<TKey, TValue>.Enumerator enumerator)
src\Dependencies\Collections\Segmented\SegmentedCollectionsMarshal.cs (24)
64/// Gets either a read-only ref to a <typeparamref name="TValue"/> in the <see cref="ImmutableSegmentedDictionary{TKey, TValue}"/> 75public static ref readonly TValue GetValueRefOrNullRef<TKey, TValue>(ImmutableSegmentedDictionary<TKey, TValue> dictionary, TKey key) 77=> ref ImmutableSegmentedDictionary<TKey, TValue>.PrivateMarshal.FindValue(dictionary, key); 80/// Gets either a ref to a <typeparamref name="TValue"/> in the <see cref="ImmutableSegmentedDictionary{TKey, TValue}.Builder"/> 88/// Items should not be added or removed from the <see cref="ImmutableSegmentedDictionary{TKey, TValue}.Builder"/> 93public static ref TValue GetValueRefOrNullRef<TKey, TValue>(ImmutableSegmentedDictionary<TKey, TValue>.Builder dictionary, TKey key) 95=> ref ImmutableSegmentedDictionary<TKey, TValue>.Builder.PrivateMarshal.FindValue(dictionary, key); 182/// Gets an <see cref="ImmutableSegmentedDictionary{TKey, TValue}"/> value wrapping the input <see cref="SegmentedDictionary{TKey, TValue}"/>. 186/// <param name="dictionary">The input segmented dictionary to wrap in the returned <see cref="ImmutableSegmentedDictionary{TKey, TValue}"/> value.</param> 187/// <returns>An <see cref="ImmutableSegmentedDictionary{TKey, TValue}"/> value wrapping <paramref name="dictionary"/>.</returns> 191/// dictionary, and that it won't be modified once the returned <see cref="ImmutableSegmentedDictionary{TKey, TValue}"/> 193/// of a given <see cref="ImmutableSegmentedDictionary{TKey, TValue}"/> values to change after its creation. 196/// If <paramref name="dictionary"/> is <see langword="null"/>, the returned <see cref="ImmutableSegmentedDictionary{TKey, TValue}"/> 197/// value will be uninitialized (i.e. its <see cref="ImmutableSegmentedDictionary{TKey, TValue}.IsDefault"/> 201public static ImmutableSegmentedDictionary<TKey, TValue> AsImmutableSegmentedDictionary<TKey, TValue>(SegmentedDictionary<TKey, TValue>? dictionary) 203=> ImmutableSegmentedDictionary<TKey, TValue>.PrivateMarshal.AsImmutableSegmentedDictionary(dictionary); 206/// Gets the underlying <see cref="SegmentedDictionary{TKey, TValue}"/> for an input <see cref="ImmutableSegmentedDictionary{TKey, TValue}"/> value. 208/// <typeparam name="TKey">The type of keys in the input <see cref="ImmutableSegmentedDictionary{TKey, TValue}"/> value.</typeparam> 209/// <typeparam name="TValue">The type of values in the input <see cref="ImmutableSegmentedDictionary{TKey, TValue}"/> value.</typeparam> 210/// <param name="dictionary">The input <see cref="ImmutableSegmentedDictionary{TKey, TValue}"/> value to get the underlying <see cref="SegmentedDictionary{TKey, TValue}"/> from.</param> 216/// don't expect the contents of the <see cref="ImmutableSegmentedDictionary{TKey, TValue}"/> value to change. 219/// If <paramref name="dictionary"/> is uninitialized (i.e. its <see cref="ImmutableSegmentedDictionary{TKey, TValue}.IsDefault"/> 223public static SegmentedDictionary<TKey, TValue>? AsSegmentedDictionary<TKey, TValue>(ImmutableSegmentedDictionary<TKey, TValue> dictionary) 225=> ImmutableSegmentedDictionary<TKey, TValue>.PrivateMarshal.AsSegmentedDictionary(dictionary);
Syntax\SyntaxNodeExtensions_Tracking.cs (1)
196private readonly ImmutableSegmentedDictionary<SyntaxAnnotation, IReadOnlyList<SyntaxNode>> _idToNodeMap;
Microsoft.CodeAnalysis.CSharp (1)
Symbols\NamedTypeSymbol.cs (1)
32/// <see langword="default"/> if uninitialized. <see cref="RequiredMembersErrorSentinel"/> if there are errors. <see cref="ImmutableSegmentedDictionary{TKey, TValue}.Empty"/> if
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (5)
Emit\EditAndContinue\SymbolMatcherTests.cs (5)
485var anonymousTypeMap0 = synthesizedTypes0.AnonymousTypes; 555var anonymousTypeMap0 = synthesizedTypes0.AnonymousTypes; 1110var anonymousTypeMap0 = synthesizedTypes0.AnonymousTypes; 1463var synthesizedDelegates0 = synthesizedTypes0.AnonymousDelegates; 1531var anonymousDelegates0 = synthesizedTypes0.AnonymousDelegatesWithIndexedNames;
Microsoft.CodeAnalysis.UnitTests (4)
Collections\ImmutableSegmentedDictionaryBuilderTest.cs (2)
57var set = ImmutableSegmentedDictionary<int, string>.Empty.Add(1, "1"); 126var collection = ImmutableSegmentedDictionary<int, string?>.Empty.Add(1, null);
Collections\ImmutableSegmentedDictionaryTest.cs (2)
39var map = Empty<string, string>(StringComparer.Ordinal) 54var map = Empty<string, string>(StringComparer.Ordinal)
Microsoft.CodeAnalysis.VisualBasic (3)
Symbols\NamedTypeSymbol.vb (3)
31''' <see cref="ImmutableSegmentedDictionary(Of String, Symbol).Empty"/> if there are no required members. Otherwise, 1104''' this will be <see cref="ImmutableSegmentedDictionary(Of String, Symbol).Empty"/>. 1116''' true, <see cref="AllRequiredMembers"/> will be <see cref="ImmutableSegmentedDictionary(Of String, Symbol).Empty"/>