Esempio n. 1
0
 /// <summary>
 /// Add a filter clause.
 /// </summary>
 /// <param name="filterClause">The clause to add.</param>
 public void Add(BooleanFilterClause filterClause)
 {
     if (filterClause.Occur == BooleanClause.Occur.MUST)
     {
         if (mustFilters == null)
         {
             mustFilters = new List <Filter>();
         }
         mustFilters.Add(filterClause.Filter);
     }
     if (filterClause.Occur == BooleanClause.Occur.SHOULD)
     {
         if (shouldFilters == null)
         {
             shouldFilters = new List <Filter>();
         }
         shouldFilters.Add(filterClause.Filter);
     }
     if (filterClause.Occur == BooleanClause.Occur.MUST_NOT)
     {
         if (notFilters == null)
         {
             notFilters = new List <Filter>();
         }
         notFilters.Add(filterClause.Filter);
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Add a filter clause.
 /// </summary>
 /// <param name="filterClause">The clause to add.</param>
 public void Add(BooleanFilterClause filterClause)
 {
     if (filterClause.Occur == BooleanClause.Occur.MUST)
     {
         if (mustFilters == null)
         {
             mustFilters = new List<Filter>();
         }
         mustFilters.Add(filterClause.Filter);
     }
     if (filterClause.Occur == BooleanClause.Occur.SHOULD)
     {
         if (shouldFilters == null)
         {
             shouldFilters = new List<Filter>();
         }
         shouldFilters.Add(filterClause.Filter);
     }
     if (filterClause.Occur == BooleanClause.Occur.MUST_NOT)
     {
         if (notFilters == null)
         {
             notFilters = new List<Filter>();
         }
         notFilters.Add(filterClause.Filter);
     }
 }