public ContactSource(object[] items) { if (items != null && items.Any()) { if (items.GetValue(0).GetType() == typeof(CfContact)) { Items = items.Select(i => ContactMapper.ToContact(i as CfContact)).ToArray(); } else if (items.GetValue(0).GetType() == typeof(CfContactSourceNumbers)) { Items = items.Select(i => ContactSourceNumbersMapper.ToContactSourceNumbers(i as CfContactSourceNumbers)).ToArray(); } else { Items = items; } } }