Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 public void TestInitialize()
 {
     propertyNamesCache = new PropertyNamesCache();
 }
Exemplo n.º 3
0
 /// <summary>
 /// Initializes the <see cref="ControlBase"/> class.
 /// </summary>
 static ControlBase()
 {
     PropertyNamesCache = new PropertyNamesCache();
 }
Exemplo n.º 4
0
 public void TestInitialize()
 {
     propertyNamesCache = new PropertyNamesCache();
 }
Exemplo n.º 5
0
 /// <summary>
 /// Initializes the <see cref="ControlBase"/> class.
 /// </summary>
 static ControlBase()
 {
     PropertyNamesCache = new PropertyNamesCache();
 }