Skip to content

Commit b9dabaf

Browse files
committed
Cleanup some overly verbose types that VisualStudio used when replacing "var" usages per ImageSharp style guidelines
1 parent a6333af commit b9dabaf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/ImageSharp.Web/Synchronization/RefCountedConcurrentDictionary.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public TValue Get(TKey key)
9696
{
9797
while (true)
9898
{
99-
if (this.dictionary.TryGetValue(key, out RefCountedConcurrentDictionary<TKey, TValue>.RefCountedValue? refCountedValue))
99+
if (this.dictionary.TryGetValue(key, out RefCountedValue? refCountedValue))
100100
{
101101
// Increment ref count
102102
if (this.dictionary.TryUpdate(key, new RefCountedValue(refCountedValue.Value, refCountedValue.RefCount + 1), refCountedValue))
@@ -131,7 +131,7 @@ public void Release(TKey key)
131131
{
132132
while (true)
133133
{
134-
if (!this.dictionary.TryGetValue(key, out RefCountedConcurrentDictionary<TKey, TValue>.RefCountedValue? refCountedValue))
134+
if (!this.dictionary.TryGetValue(key, out RefCountedValue? refCountedValue))
135135
{
136136
// This is BAD. It indicates a ref counting problem where someone is either double-releasing,
137137
// or they're releasing a key that they never obtained in the first place!!
@@ -196,7 +196,7 @@ public RefCountedDictionaryEnumerator(RefCountedConcurrentDictionary<TKey, TValu
196196
{
197197
get
198198
{
199-
KeyValuePair<TKey, RefCountedConcurrentDictionary<TKey, TValue>.RefCountedValue> keyValuePair = this.enumerator.Current;
199+
KeyValuePair<TKey, RefCountedValue> keyValuePair = this.enumerator.Current;
200200
return (keyValuePair.Key, keyValuePair.Value.Value, keyValuePair.Value.RefCount);
201201
}
202202
}

0 commit comments

Comments
 (0)