Clean up logic of object interpretation in PDT interpreter.

This commit is contained in:
2023-04-07 12:21:20 +08:00
parent 1fc5ea8ac6
commit 6cb36a7064
3 changed files with 40 additions and 54 deletions

View File

@@ -29,6 +29,10 @@ namespace Cryville.Common.Collections {
if (_pairList != null) _pairList.CopyTo(array, index);
else _dictionary.CopyTo(array, index);
}
public static bool IsPairCollection(Type type) {
return typeof(IPairList).IsAssignableFrom(type) || typeof(IDictionary).IsAssignableFrom(type);
}
}
internal class PairCollectionDebugView {
readonly PairCollection _self;