示例#1
0
 public void ShouldMatchText()
 {
     PropertyFilterPredicate predicate = new PropertyFilterPredicate("test");
       Assert.IsTrue(predicate.Match("Test"));
       Assert.IsTrue(predicate.Match("TestMe"));
       Assert.IsTrue(predicate.Match("ThisIsATest"));
 }
示例#2
0
 /// <summary>
 /// Checks whether the entry matches the filtering predicate.
 /// </summary>
 /// <param name="predicate">The filtering predicate.</param>
 /// <returns>
 ///     <c>true</c> if entry matches predicate; otherwise, <c>false</c>.
 /// </returns>
 public override bool MatchesPredicate(PropertyFilterPredicate predicate)
 {
     if (predicate == null)
     {
         return(false);
     }
     if (!predicate.Match(this.DisplayName))
     {
         return((PropertyType != null)
   ? predicate.Match(PropertyType.Name)
   : false);
     }
     return(true);
 }
示例#3
0
文件: CategoryItem.cs 项目: yk35/WPG
 /// <summary>
 /// Checks whether the entry matches the filtering predicate.
 /// </summary>
 /// <param name="predicate">The filtering predicate.</param>
 /// <returns>
 ///     <c>true</c> if entry matches predicate; otherwise, <c>false</c>.
 /// </returns>
 public override bool MatchesPredicate(PropertyFilterPredicate predicate)
 {
     return(_properties.All(property => property.MatchesPredicate(predicate)));
 }
示例#4
0
文件: GridEntry.cs 项目: adoregnu/WPG
 /// <summary>
 /// Checks whether the entry matches the filtering predicate.
 /// </summary>
 /// <param name="predicate">The filtering predicate.</param>        
 /// <returns><c>true</c> if entry matches predicate; otherwise, <c>false</c>.</returns>
 public abstract bool MatchesPredicate(PropertyFilterPredicate predicate);
示例#5
0
 /// <summary>
 /// Checks whether the entry matches the filtering predicate.
 /// </summary>
 /// <param name="predicate">The filtering predicate.</param>
 /// <returns>
 /// 	<c>true</c> if entry matches predicate; otherwise, <c>false</c>.
 /// </returns>   
 public override bool MatchesPredicate(PropertyFilterPredicate predicate)
 {
     return _properties.All(property => property.MatchesPredicate(predicate));
 }
示例#6
0
 public override bool MatchesPredicate(PropertyFilterPredicate predicate)
 {
     return false;
 }
示例#7
0
 /// <summary>
 /// Checks whether the entry matches the filtering predicate.
 /// </summary>
 /// <param name="predicate">The filtering predicate.</param>
 /// <returns><c>true</c> if entry matches predicate; otherwise, <c>false</c>.</returns>
 public abstract bool MatchesPredicate(PropertyFilterPredicate predicate);
示例#8
0
 public bool MatchesPredicate(PropertyFilterPredicate predicate)
 {
     if (predicate == null) return false;
     return predicate.Match(this.Name);
 }
示例#9
0
 public void ShouldInitializeMatchTextUpperCased()
 {
     PropertyFilterPredicate predicate = new PropertyFilterPredicate("test");
       Assert.AreEqual<string>("TEST", predicate.MatchText);
 }