本文整理汇总了C#中IFileReader.GetNextChar方法的典型用法代码示例。如果您正苦于以下问题:C# IFileReader.GetNextChar方法的具体用法?C# IFileReader.GetNextChar怎么用?C# IFileReader.GetNextChar使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IFileReader
的用法示例。
在下文中一共展示了IFileReader.GetNextChar方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ParseNext
public void ParseNext(IFileReader reader, IRowParsingContext rowParsingContext)
{
ResetParsingState();
ParsingResult parsingResult = ParsingResult.Match;
char currentChar = '\0';
do
{
if (currentText.Length >= ParsingBufferMaxSize)
{
ParsingBufferOverflowException ex = new ParsingBufferOverflowException();
if (rowParsingContext != null)
{
ex.ColumnIndex = rowParsingContext.ColumnCount;
}
throw ex;
}
if (parsingResult != ParsingResult.Miss)
{
currentChar = reader.GetNextChar();
if (reader.IsEOF)
{
break;
}
else if (rowParsingContext != null)
{
rowParsingContext.Append(currentChar);
}
}
if (this.currentParsingState != null)
{
parsingResult = currentParsingState.ProcessCharacter(this, currentChar);
}
else
{
// We should not get into this state for our parsing.
// It would mean our graph of states is not connected properly.
throw new FieldParsingException(MessageStrings.BadParsingGraphError);
}
}
while (parsingResult != ParsingResult.Done);
}