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