コード例 #1
0
ファイル: ControlBaseOfT.cs プロジェクト: testpulse/cuite
        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
ファイル: ControlBase.cs プロジェクト: testpulse/cuite
 /// <summary>
 /// Initializes the <see cref="ControlBase"/> class.
 /// </summary>
 static ControlBase()
 {
     PropertyNamesCache = new PropertyNamesCache();
 }
コード例 #4
0
 public void TestInitialize()
 {
     propertyNamesCache = new PropertyNamesCache();
 }
コード例 #5
0
ファイル: ControlBase.cs プロジェクト: kasthurk/cuite
 /// <summary>
 /// Initializes the <see cref="ControlBase"/> class.
 /// </summary>
 static ControlBase()
 {
     PropertyNamesCache = new PropertyNamesCache();
 }