Lucene.Net.Analysis.Util.TokenizerFactory.ForName C# (CSharp) Method

ForName() public static method

looks up a tokenizer by name from context classpath
public static ForName ( string name, string>.IDictionary args ) : TokenizerFactory
name string
args string>.IDictionary
return TokenizerFactory
        public static TokenizerFactory ForName(string name, IDictionary<string, string> args)
        {
            return loader.NewInstance(name, args);
        }

Usage Example

Exemplo n.º 1
0
        public virtual void TestBogusLookupTokenizer()
        {
            try
            {
                TokenizerFactory.ForName("sdfsdfsdfdsfsdfsdf", new Dictionary <string, string>());
                fail();
            }
            catch (Exception expected) when(expected.IsIllegalArgumentException())
            {
                //
            }

            try
            {
                TokenizerFactory.ForName("!(**#$U*#$*", new Dictionary <string, string>());
                fail();
            }
            catch (Exception expected) when(expected.IsIllegalArgumentException())
            {
                //
            }
        }
All Usage Examples Of Lucene.Net.Analysis.Util.TokenizerFactory::ForName