12 instantiations of SegmentedDictionary
Microsoft.CodeAnalysis.CodeStyle (12)
FormattingContext.cs (1)
44
private readonly SegmentedDictionary<SyntaxToken, AnchorData> _anchorBaseTokenMap =
new
();
ImmutableSegmentedDictionary`2.cs (6)
73
public static readonly ImmutableSegmentedDictionary<TKey, TValue> Empty = new(new
SegmentedDictionary
<TKey, TValue>());
150
var dictionary = new
SegmentedDictionary
<TKey, TValue>(self._dictionary, self._dictionary.Comparer);
172
dictionary ??= new
SegmentedDictionary
<TKey, TValue>(self._dictionary, self._dictionary.Comparer);
214
var dictionary = new
SegmentedDictionary
<TKey, TValue>(self._dictionary, self._dictionary.Comparer);
237
var dictionary = new
SegmentedDictionary
<TKey, TValue>(self._dictionary, self._dictionary.Comparer);
295
return new ImmutableSegmentedDictionary<TKey, TValue>(new
SegmentedDictionary
<TKey, TValue>(keyComparer));
ImmutableSegmentedDictionary`2+Builder.cs (3)
48
_mutableDictionary = new
SegmentedDictionary
<TKey, TValue>(value);
98
return _mutableDictionary ??= new
SegmentedDictionary
<TKey, TValue>(_dictionary._dictionary, _dictionary.KeyComparer);
126
_mutableDictionary = new
SegmentedDictionary
<TKey, TValue>(KeyComparer);
ObjectWriter.cs (2)
393
new(() => new
SegmentedDictionary
<object, int>(128, ReferenceEqualityComparer.Instance));
396
new(() => new
SegmentedDictionary
<object, int>(128));
34 references to SegmentedDictionary
Microsoft.CodeAnalysis.CodeStyle (34)
FormattingContext.cs (1)
44
private readonly
SegmentedDictionary
<SyntaxToken, AnchorData> _anchorBaseTokenMap = new();
ImmutableSegmentedDictionary`2.cs (6)
75
private readonly
SegmentedDictionary
<TKey, TValue> _dictionary;
77
private ImmutableSegmentedDictionary(
SegmentedDictionary
<TKey, TValue> dictionary)
150
var
dictionary = new SegmentedDictionary<TKey, TValue>(self._dictionary, self._dictionary.Comparer);
165
SegmentedDictionary
<TKey, TValue>? dictionary = null;
214
var
dictionary = new SegmentedDictionary<TKey, TValue>(self._dictionary, self._dictionary.Comparer);
237
var
dictionary = new SegmentedDictionary<TKey, TValue>(self._dictionary, self._dictionary.Comparer);
ImmutableSegmentedDictionary`2+Builder.cs (4)
25
private
SegmentedDictionary
<TKey, TValue>? _mutableDictionary;
47
var
valuesToAdd = ReadOnlyDictionary;
60
private
SegmentedDictionary
<TKey, TValue> ReadOnlyDictionary => _mutableDictionary ?? _dictionary._dictionary;
96
private
SegmentedDictionary
<TKey, TValue> GetOrCreateMutableDictionary()
ImmutableSegmentedDictionary`2+Enumerator.cs (3)
14
private readonly
SegmentedDictionary
<TKey, TValue> _dictionary;
16
private
SegmentedDictionary
<TKey, TValue>.Enumerator _enumerator;
18
internal Enumerator(
SegmentedDictionary
<TKey, TValue> dictionary, ReturnType returnType)
ImmutableSegmentedDictionary`2+PrivateInterlocked.cs (3)
19
var
dictionary = Volatile.Read(ref Unsafe.AsRef(in location._dictionary));
28
var
dictionary = Interlocked.Exchange(ref Unsafe.AsRef(in location._dictionary), value._dictionary);
37
var
dictionary = Interlocked.CompareExchange(ref Unsafe.AsRef(in location._dictionary), value._dictionary, comparand._dictionary);
ObjectWriter.cs (4)
388
private readonly
SegmentedDictionary
<object, int> _valueToIdMap;
392
private static readonly ObjectPool<
SegmentedDictionary
<object, int>> s_referenceDictionaryPool =
395
private static readonly ObjectPool<
SegmentedDictionary
<object, int>> s_valueDictionaryPool =
405
private static ObjectPool<
SegmentedDictionary
<object, int>> GetDictionaryPool(bool valueEquality)
SegmentedDictionary`2.cs (13)
117
if (dictionary.GetType() == typeof(
SegmentedDictionary
<TKey, TValue>))
119
var
d = (
SegmentedDictionary
<TKey, TValue>)dictionary;
1138
private readonly
SegmentedDictionary
<TKey, TValue> _dictionary;
1147
internal Enumerator(
SegmentedDictionary
<TKey, TValue> dictionary, int getEnumeratorRetType)
1260
private readonly
SegmentedDictionary
<TKey, TValue> _dictionary;
1262
public KeyCollection(
SegmentedDictionary
<TKey, TValue> dictionary)
1388
private readonly
SegmentedDictionary
<TKey, TValue> _dictionary;
1393
internal Enumerator(
SegmentedDictionary
<TKey, TValue> dictionary)
1460
private readonly
SegmentedDictionary
<TKey, TValue> _dictionary;
1462
public ValueCollection(
SegmentedDictionary
<TKey, TValue> dictionary)
1588
private readonly
SegmentedDictionary
<TKey, TValue> _dictionary;
1593
internal Enumerator(
SegmentedDictionary
<TKey, TValue> dictionary)