You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Connected.Framework/Connected.Interop/Merging/Merger.cs

25 lines
543 B

2 years ago
using System.Collections;
using System.Reflection;
namespace Connected.Interop.Merging
{
internal abstract class Merger
{
protected static bool IsArray(PropertyInfo property)
{
return property.PropertyType.IsArray || property.PropertyType.GetInterface(typeof(IEnumerable).FullName) is not null;
}
protected static List<object> GetElements(IEnumerable enumerator)
{
var result = new List<object>();
var en = enumerator.GetEnumerator();
while (en.MoveNext())
result.Add(en.Current);
return result;
}
}
}