예제 #1
0
 public bool HasPendingImports()
 {
     using (CSObjectEnumerator e = this.GetPendingImports(true, true, true, 10, 0, 0))
     {
         return(e.BatchCount > 0);
     }
 }
예제 #2
0
 private CSObject GetSingleCSObject(string criteria)
 {
     using (CSObjectEnumerator x = this.ExecuteCSSearch(criteria))
     {
         if (x.BatchCount == 0)
         {
             return(null);
         }
         else if (x.BatchCount > 1)
         {
             throw new InvalidOperationException("The search returned too many results");
         }
         else
         {
             return(x.First());
         }
     }
 }