本文整理汇总了C#中ITokener类的典型用法代码示例。如果您正苦于以下问题:C# ITokener类的具体用法?C# ITokener怎么用?C# ITokener使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ITokener类属于命名空间,在下文中一共展示了ITokener类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ParseAddrSpec
public static int ParseAddrSpec(
string str,
int index,
int endIndex,
ITokener tokener) {
int indexStart, indexTemp, state, tx2;
indexStart = index;
state = (tokener != null) ? tokener.GetState() : 0;
indexTemp = index;
do {
tx2 = ParseLocalPart(str, index, endIndex, tokener);
if (tx2 == index) {
break;
} else {
index = tx2;
}
if (index < endIndex && (str[index] == 64)) {
++index;
} else {
index = indexStart; break;
}
tx2 = ParseDomain(str, index, endIndex, tokener);
if (tx2 == index) {
index = indexStart; break;
} else {
index = tx2;
}
indexTemp = index;
} while (false);
if (tokener != null && indexTemp == indexStart) {
tokener.RestoreState(state);
}
return indexTemp;
}
示例2: ParseAddress
public static int ParseAddress(
string str,
int index,
int endIndex,
ITokener tokener) {
int indexStart, indexTemp, indexTemp2, state;
indexStart = index;
state = (tokener != null) ? tokener.GetState() : 0;
indexTemp = index;
do {
indexTemp2 = ParseMailbox(str, index, endIndex, tokener);
if (indexTemp2 != index) {
indexTemp = indexTemp2; break;
}
indexTemp2 = ParseGroup(str, index, endIndex, tokener);
if (indexTemp2 != index) {
indexTemp = indexTemp2; break;
}
} while (false);
if (tokener != null && indexTemp == indexStart) {
tokener.RestoreState(state);
}
return indexTemp;
}
示例3: Parse
public override int Parse(
string str,
int index,
int endIndex,
ITokener tokener)
{
return HeaderParser.ParseHeaderListId(str, index, endIndex, tokener);
}