public int doLogic() throws IOException {String analyzerName = null;try {if (current >= analyzerNames.size()) {current = 0;}analyzerName = analyzerNames.get(current++);Analyzer analyzer = null;if (null == analyzerName || 0 == analyzerName.length()) {analyzerName = "org.apache.lucene.analysis.standard.StandardAnalyzer";}AnalyzerFactory factory = getRunData().getAnalyzerFactories().get(analyzerName);if (null != factory) {analyzer = factory.create();} else {if (analyzerName.contains(".")) {if (analyzerName.startsWith("standard.")) {analyzerName = "org.apache.lucene.analysis." + analyzerName;}analyzer = createAnalyzer(analyzerName);} else { try {String coreClassName = "org.apache.lucene.analysis.core." + analyzerName;analyzer = createAnalyzer(coreClassName);analyzerName = coreClassName;} catch (ClassNotFoundException e) {analyzerName = "org.apache.lucene.analysis." + analyzerName;analyzer = createAnalyzer(analyzerName);}}}getRunData().setAnalyzer(analyzer);} catch (Exception e) {throw new RuntimeException("Error creating Analyzer: " + analyzerName, e);}return 1;}
public override int DoLogic(){string analyzerName = null;try{if (current >= analyzerNames.Count){current = 0;}analyzerName = analyzerNames[current++];Analyzer analyzer = null;if (null == analyzerName || 0 == analyzerName.Length){analyzerName = typeof(Lucene.Net.Analysis.Standard.StandardAnalyzer).AssemblyQualifiedName;}AnalyzerFactory factory;if (RunData.AnalyzerFactories.TryGetValue(analyzerName, out factory) && null != factory){analyzer = factory.Create();}else{if (analyzerName.Contains(".")){if (analyzerName.StartsWith("Standard.", StringComparison.Ordinal)){analyzerName = "Lucene.Net.Analysis." + analyzerName;}analyzer = CreateAnalyzer(analyzerName);}else{ try{string coreClassName = "Lucene.Net.Analysis.Core." + analyzerName;analyzer = CreateAnalyzer(coreClassName);analyzerName = coreClassName;}catch (TypeLoadException ){analyzerName = "Lucene.Net.Analysis." + analyzerName;analyzer = CreateAnalyzer(analyzerName);}}}RunData.Analyzer = analyzer;}catch (Exception e){throw new Exception("Error creating Analyzer: " + analyzerName, e);}return 1;}