Code cleanup.

This commit is contained in:
2023-03-03 13:34:12 +08:00
parent 7736eba14d
commit 28c878f3e5
15 changed files with 31 additions and 31 deletions

View File

@@ -5,8 +5,8 @@ using System.Collections.Generic;
namespace Cryville.Common.Collections.Generic {
public struct PairCollection : IDisposable {
public void Dispose() { }
IPairList _pairList;
IDictionary _dictionary;
readonly IPairList _pairList;
readonly IDictionary _dictionary;
public PairCollection(object collection) : this() {
var type = collection.GetType();
if (typeof(IPairList).IsAssignableFrom(type)) _pairList = (IPairList)collection;
@@ -20,8 +20,8 @@ namespace Cryville.Common.Collections.Generic {
}
public struct PairCollection<TKey, TValue> : IDisposable {
public void Dispose() { }
IPairList<TKey, TValue> _pairList;
IDictionary<TKey, TValue> _dictionary;
readonly IPairList<TKey, TValue> _pairList;
readonly IDictionary<TKey, TValue> _dictionary;
public PairCollection(object collection) : this() {
var type = collection.GetType();
if (typeof(IPairList<TKey, TValue>).IsAssignableFrom(type)) _pairList = (IPairList<TKey, TValue>)collection;