예제 #1
0
 /// <summary>  Determines whether the specified item has problems of
 /// <see cref="RuleLevel.Error"/> or higher.  </summary>
 /// <typeparam name="TItem">type of the item to run rules against</typeparam>
 /// <param name="item">The item to run rules against.</param>
 /// <param name="rules">The rules to execute.</param>
 /// <returns>
 ///     <c>true</c> if the specified item is in error state; otherwise, <c>false</c>.
 /// </returns>
 public static bool IsError <TItem>(TItem item, params Rule <TItem>[] rules)
 {
     using (IScope scope = new TrackScope())
     {
         scope.ValidateInScope(item, rules);
         return(scope.IsError());
     }
 }
 public void Test_Nesting()
 {
     using (var t = new TrackScope())
     {
         ScopeTestHelper.RunNesting(0, t);
         Assert.IsTrue(t.IsError());
     }
 }
예제 #3
0
 public void Test_Nesting()
 {
     using (var t = new TrackScope())
     {
         ScopeTestHelper.RunNesting(0, t);
         Assert.IsTrue(t.IsError());
     }
 }