本文整理汇总了C#中ITokenizer.NextToken方法的典型用法代码示例。如果您正苦于以下问题:C# ITokenizer.NextToken方法的具体用法?C# ITokenizer.NextToken怎么用?C# ITokenizer.NextToken使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ITokenizer
的用法示例。
在下文中一共展示了ITokenizer.NextToken方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AssertTokenValues
public static void AssertTokenValues(ITokenizer tokenizer, params string[] expectedValues)
{
foreach (string value in expectedValues)
{
Assertion.AssertEquals(value, tokenizer.NextToken().Value);
}
Assertion.AssertNull(tokenizer.NextToken());
}
示例2: AssertTokens
public static void AssertTokens(ITokenizer tokenizer, params Token[] tokens)
{
foreach (Token expected in tokens)
{
Assertion.AssertEquals(expected, tokenizer.NextToken());
}
}
示例3: IncludeAll
SearchResult IncludeAll(ITokenizer tokenizer, Token token)
{
ArrayList results = new ArrayList();
while (null != token)
{
SearchResult tokenResult = new SearchResult();
SearchToken(tokenResult, token);
results.Add(tokenResult);
token = tokenizer.NextToken();
}
SearchResult result = (SearchResult)results[0];
for (int i=1; i<results.Count && result.Count > 0; ++i)
{
result = result.Intersect((SearchResult)results[i]);
}
return result;
}
示例4: IncludeAny
SearchResult IncludeAny(ITokenizer tokenizer, Token token)
{
SearchResult result = new SearchResult();
while (null != token)
{
SearchToken(result, token);
token = tokenizer.NextToken();
}
return result;
}