using System.Linq; namespace System.Collections.Generic { internal static class EnumerableExtensions { /// /// Creates a new list wrapping the specified items. /// If is , returns an empty list. /// public static IList ToNonNullList(this IEnumerable items) { if(items == null) return new List(); return items.ToList(); } } }