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 GetElements(IEnumerable enumerator) { var result = new List(); var en = enumerator.GetEnumerator(); while (en.MoveNext()) result.Add(en.Current); return result; } } }