private static SearchCondition Join(string condition, SearchCondition left, params SearchCondition[] right) {
      condition = condition.ToUpper();

      if (left.Operator != condition) {
        left = new SearchCondition { Operator = condition, Conditions = new List<SearchCondition> { left } };
      }

      left.Conditions.AddRange(right);
      return left;
    }
Beispiel #2
0
 public virtual Lazy<MailMessage>[] SearchMessages(SearchCondition criteria, bool headersonly = false, bool setseen = false)
 {
     return Search(criteria, true)
             .Select(x => new Lazy<MailMessage>(() => GetMessage(x, headersonly, setseen)))
             .ToArray();
 }
Beispiel #3
0
 public virtual string[] Search(SearchCondition criteria, bool uid = true)
 {
     return Search(criteria.ToString(), uid);
 }
Beispiel #4
0
 public virtual Lazy <MailMessage>[] SearchMessages(SearchCondition criteria, bool headersonly = false, bool setseen = false)
 {
     return(Search(criteria, true)
            .Select(x => new Lazy <MailMessage>(() => GetMessage(x, headersonly, setseen)))
            .ToArray());
 }
Beispiel #5
0
 public virtual string[] Search(SearchCondition criteria, bool uid = true)
 {
     return(Search(criteria.ToString(), uid));
 }