feat: Splitting iterators from validation

This commit is contained in:
Chris Cameron
2018-06-14 11:21:46 -04:00
parent 3689517124
commit 653bf361ef
5 changed files with 114 additions and 28 deletions

View File

@@ -210,18 +210,15 @@ namespace ICD.Common.Utils.Extensions
if (!s_TypeBaseTypes.ContainsKey(extends))
{
Type[] types = GetBaseTypesInternal(extends).ToArray();
Type[] types = GetBaseTypesIterator(extends).ToArray();
s_TypeBaseTypes.Add(extends, types);
}
return s_TypeBaseTypes[extends];
}
private static IEnumerable<Type> GetBaseTypesInternal(Type type)
private static IEnumerable<Type> GetBaseTypesIterator(Type type)
{
if (type == null)
throw new ArgumentNullException("type");
do
{
type = type