private static void ValidateSearchPropertyNames(IEnumerable<PropertyExpression> searchProperties) { string[] validSearchPropertyNames = PropertyNamesCache.GetPropertyNamesFor<T>() .ToArray(); string[] invalidSearchPropertyNames = searchProperties .Select(searchProperty => searchProperty.PropertyName) .Except(validSearchPropertyNames, StringComparer.OrdinalIgnoreCase) .ToArray(); if (invalidSearchPropertyNames.Any()) throw new InvalidSearchPropertyNamesException(invalidSearchPropertyNames, validSearchPropertyNames); }
public void TestInitialize() { propertyNamesCache = new PropertyNamesCache(); }
/// <summary> /// Initializes the <see cref="ControlBase"/> class. /// </summary> static ControlBase() { PropertyNamesCache = new PropertyNamesCache(); }