@@ -25,7 +25,7 @@ internal enum NetworkedListEventType
25
25
}
26
26
27
27
public NetworkedVarSettings Settings = new NetworkedVarSettings ( ) ;
28
- private readonly Dictionary < TKey , TValue > dictionary = new Dictionary < TKey , TValue > ( ) ;
28
+ private readonly IDictionary < TKey , TValue > dictionary = new Dictionary < TKey , TValue > ( ) ;
29
29
private NetworkedBehaviour networkedBehaviour ;
30
30
private readonly List < NetworkedDictionaryEvent < TKey , TValue > > dirtyEvents = new List < NetworkedDictionaryEvent < TKey , TValue > > ( ) ;
31
31
@@ -215,13 +215,13 @@ public TValue this[TKey key]
215
215
}
216
216
}
217
217
218
- public ICollection < TKey > Keys => ( ( IDictionary < TKey , TValue > ) dictionary ) . Keys ;
218
+ public ICollection < TKey > Keys => dictionary . Keys ;
219
219
220
- public ICollection < TValue > Values => ( ( IDictionary < TKey , TValue > ) dictionary ) . Values ;
220
+ public ICollection < TValue > Values => dictionary . Values ;
221
221
222
222
public int Count => dictionary . Count ;
223
223
224
- public bool IsReadOnly => ( ( IDictionary < TKey , TValue > ) dictionary ) . IsReadOnly ;
224
+ public bool IsReadOnly => dictionary . IsReadOnly ;
225
225
226
226
public void Add ( TKey key , TValue value )
227
227
{
@@ -236,7 +236,7 @@ public void Add(TKey key, TValue value)
236
236
237
237
public void Add ( KeyValuePair < TKey , TValue > item )
238
238
{
239
- ( ( IDictionary < TKey , TValue > ) dictionary ) . Add ( item ) ;
239
+ dictionary . Add ( item ) ;
240
240
dirtyEvents . Add ( new NetworkedDictionaryEvent < TKey , TValue > ( )
241
241
{
242
242
eventType = NetworkedDictionaryEvent < TKey , TValue > . NetworkedListEventType . Add ,
@@ -256,7 +256,7 @@ public void Clear()
256
256
257
257
public bool Contains ( KeyValuePair < TKey , TValue > item )
258
258
{
259
- return ( ( IDictionary < TKey , TValue > ) dictionary ) . Contains ( item ) ;
259
+ return dictionary . Contains ( item ) ;
260
260
}
261
261
262
262
public bool ContainsKey ( TKey key )
@@ -266,12 +266,12 @@ public bool ContainsKey(TKey key)
266
266
267
267
public void CopyTo ( KeyValuePair < TKey , TValue > [ ] array , int arrayIndex )
268
268
{
269
- ( ( IDictionary < TKey , TValue > ) dictionary ) . CopyTo ( array , arrayIndex ) ;
269
+ dictionary . CopyTo ( array , arrayIndex ) ;
270
270
}
271
271
272
272
public IEnumerator < KeyValuePair < TKey , TValue > > GetEnumerator ( )
273
273
{
274
- return ( ( IDictionary < TKey , TValue > ) dictionary ) . GetEnumerator ( ) ;
274
+ return dictionary . GetEnumerator ( ) ;
275
275
}
276
276
277
277
public bool Remove ( TKey key )
@@ -290,7 +290,7 @@ public bool Remove(TKey key)
290
290
291
291
public bool Remove ( KeyValuePair < TKey , TValue > item )
292
292
{
293
- bool state = ( ( IDictionary < TKey , TValue > ) dictionary ) . Remove ( item ) ;
293
+ bool state = dictionary . Remove ( item ) ;
294
294
if ( state )
295
295
{
296
296
dirtyEvents . Add ( new NetworkedDictionaryEvent < TKey , TValue > ( )
@@ -305,7 +305,7 @@ public bool Remove(KeyValuePair<TKey, TValue> item)
305
305
306
306
IEnumerator IEnumerable . GetEnumerator ( )
307
307
{
308
- return ( ( IDictionary < TKey , TValue > ) dictionary ) . GetEnumerator ( ) ;
308
+ return dictionary . GetEnumerator ( ) ;
309
309
}
310
310
}
311
311
}
0 commit comments