3 writes to _dictionaryStorage
Microsoft.AspNetCore.Shared.Tests (3)
src\Shared\Dictionary\AdaptiveCapacityDictionary.cs (3)
82
_dictionaryStorage
= new Dictionary<TKey, TValue>(capacity, _comparer);
94
_dictionaryStorage
= dict;
519
_dictionaryStorage
= new Dictionary<TKey, TValue>(capacity, _comparer);
42 references to _dictionaryStorage
Microsoft.AspNetCore.Shared.Tests (42)
AdaptiveCapacityDictionaryTests.cs (9)
26
Assert.Null(dict.
_dictionaryStorage
);
39
Assert.Null(dict.
_dictionaryStorage
);
49
Assert.NotNull(dict.
_dictionaryStorage
);
57
Assert.NotNull(dict.
_dictionaryStorage
);
485
Assert.Null(dict.
_dictionaryStorage
);
1292
Assert.NotNull(dict.
_dictionaryStorage
);
1293
Assert.Equal(comparer, dict.
_dictionaryStorage
.Comparer);
1308
Assert.NotNull(dict.
_dictionaryStorage
);
1309
Assert.Equal(comparer, dict.
_dictionaryStorage
.Comparer);
src\Shared\Dictionary\AdaptiveCapacityDictionary.cs (33)
125
if (
_dictionaryStorage
!= null)
127
_dictionaryStorage
[key] = value;
139
_dictionaryStorage
![key] = value;
144
public int Count =>
_dictionaryStorage
!= null ?
_dictionaryStorage
.Count : _count;
171
return
_dictionaryStorage
!.Keys;
196
return
_dictionaryStorage
!.Values;
211
((ICollection<KeyValuePair<TKey, TValue>>)
_dictionaryStorage
!).Add(item);
227
if (
_dictionaryStorage
!= null)
230
_dictionaryStorage
.Add(key, value);
244
_dictionaryStorage
!.Add(key, value);
250
_dictionaryStorage
?.Clear();
266
if (
_dictionaryStorage
!= null)
268
return ((ICollection<KeyValuePair<TKey, TValue>>)
_dictionaryStorage
).Contains(item);
282
if (
_dictionaryStorage
is null)
287
return
_dictionaryStorage
.ContainsKey(key);
314
((ICollection<KeyValuePair<TKey, TValue>>)
_dictionaryStorage
!).CopyTo(array, arrayIndex);
326
if (
_dictionaryStorage
!= null)
328
return
_dictionaryStorage
.GetEnumerator();
337
if (
_dictionaryStorage
!= null)
339
return
_dictionaryStorage
.GetEnumerator();
368
return ((ICollection<KeyValuePair<TKey, TValue>>)
_dictionaryStorage
!).Remove(item);
400
return
_dictionaryStorage
!.Remove(key);
442
return
_dictionaryStorage
!.Remove(key, out value);
467
if (
_dictionaryStorage
!= null)
469
return
_dictionaryStorage
.TryAdd(key, value);
477
return
_dictionaryStorage
!.TryAdd(key, value);
493
return
_dictionaryStorage
!.TryGetValue(key, out value);
522
_dictionaryStorage
[item.Key] = item.Value;
556
Debug.Assert(
_dictionaryStorage
== null);
576
Debug.Assert(
_dictionaryStorage
== null);
616
if (_dictionary.
_dictionaryStorage
!= null)
618
_dictionaryEnumerator = _dictionary.
_dictionaryStorage
.GetEnumerator();