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.
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|