private AnalyzeTokenFiltersDescriptor AssignIfNotNull(ITokenFilter filter) =>
 Assign(a =>
 {
     if (filter != null)
     {
         a.Add(filter);
     }
 });
		public static void AssertTokens(ITokenizer tokenizer, ITokenFilter filter, params Token[] tokens)
		{
			ITokenizer actual = filter.Clone(tokenizer);
			foreach (Token expected in tokens)
			{
				Assertion.AssertEquals(expected, actual.NextToken());
			}
		}
        public static void AssertTokens(ITokenizer tokenizer, ITokenFilter filter, params Token[] tokens)
        {
            ITokenizer actual = filter.Clone(tokenizer);

            foreach (Token expected in tokens)
            {
                Assertion.AssertEquals(expected, actual.NextToken());
            }
        }
		/// <summary>
		/// Creates an empty index with a specific filter
		/// chain for token filtering.
		/// </summary>
		/// <param name="filter">the filter chain that
		/// should be used by the index to filter
		/// tokens</param>
		public FullTextSearchIndex(ITokenFilter filter) : this()
		{
			Filter = filter;
		}
		public static void AssertTokenValues(string text, ITokenFilter filter, params string[] expectedValues)
		{
			ITokenizer tokenizer = filter.Clone(new StringTokenizer(text));
			AssertTokenValues(tokenizer, expectedValues);
		}
		public static void AssertTokens(string text, ITokenFilter filter, params Token[] tokens)
		{
			AssertTokens(new StringTokenizer(text), filter, tokens);
		}
 /// <summary>
 /// Creates an empty index with a specific filter
 /// chain for token filtering.
 /// </summary>
 /// <param name="filter">the filter chain that
 /// should be used by the index to filter
 /// tokens</param>
 public FullTextSearchIndex(ITokenFilter filter) : this()
 {
     Filter = filter;
 }
 private AnalyzeTokenFiltersDescriptor AssignIfNotNull(ITokenFilter filter) =>
 Assign(filter, (a, v) => { if (v != null)
                            {
                                a.Add(v);
                            }
        });
 public ITokenFilter AddTokenFilter(ITokenFilter tf)
 {
     this.filters.Add(tf);
     return(tf);
 }
        public static void AssertTokenValues(string text, ITokenFilter filter, params string[] expectedValues)
        {
            ITokenizer tokenizer = filter.Clone(new StringTokenizer(text));

            AssertTokenValues(tokenizer, expectedValues);
        }
 public static void AssertTokens(string text, ITokenFilter filter, params Token[] tokens)
 {
     AssertTokens(new StringTokenizer(text), filter, tokens);
 }