C# Class YamlDotNet.Core.Scanner

Inheritance: IScanner
Afficher le fichier Open project: aaubry/YamlDotNet Class Usage Examples

Méthodes publiques

Méthode Description
ConsumeCurrent ( ) : void

Consumes the current token and increments the parsed token count

MoveNext ( ) : bool

Moves to the next token.

MoveNextWithoutConsuming ( ) : bool
Scanner ( TextReader input, bool skipComments = true ) : System

Initializes a new instance of the Scanner class.

Private Methods

Méthode Description
CheckWhiteSpace ( ) : bool
DecreaseFlowLevel ( ) : void

Decrease the flow level.

FetchAnchor ( bool isAlias ) : void

Produce the ALIAS or ANCHOR token.

FetchBlockEntry ( ) : void

Produce the BLOCK-ENTRY token.

FetchBlockScalar ( bool isLiteral ) : void

Produce the SCALAR(...,literal) or SCALAR(...,folded) tokens.

FetchDirective ( ) : void
FetchDocumentIndicator ( bool isStartToken ) : void

Produce the DOCUMENT-START or DOCUMENT-END token.

FetchFlowCollectionEnd ( bool isSequenceToken ) : void

Produce the FLOW-SEQUENCE-END or FLOW-MAPPING-END token.

FetchFlowCollectionStart ( bool isSequenceToken ) : void

Produce the FLOW-SEQUENCE-START or FLOW-MAPPING-START token.

FetchFlowEntry ( ) : void

Produce the FLOW-ENTRY token.

FetchFlowScalar ( bool isSingleQuoted ) : void

Produce the SCALAR(...,single-quoted) or SCALAR(...,double-quoted) tokens.

FetchKey ( ) : void

Produce the KEY token.

FetchMoreTokens ( ) : void
FetchNextToken ( ) : void
FetchPlainScalar ( ) : void

Produce the SCALAR(...,plain) token.

FetchStreamEnd ( ) : void

Produce the STREAM-END token and shut down the scanner.

FetchStreamStart ( ) : void
FetchTag ( ) : void

Produce the TAG token.

FetchValue ( ) : void

Produce the VALUE token.

IncreaseFlowLevel ( ) : void

Increase the flow level and resize the simple key list if needed.

IsDocumentIndicator ( ) : bool
ProcessComment ( ) : void
ReadCurrentCharacter ( ) : char
ReadLine ( ) : char
RemoveSimpleKey ( ) : void

Remove a potential simple key at the current flow level.

RollIndent ( int column, int number, bool isSequence, YamlDotNet.Core.Mark position ) : void

Push the current indentation level to the stack and set the new level the current column is greater than the indentation level. In this case, append or insert the specified token into the token queue.

SaveSimpleKey ( ) : void

Check if a simple key may start at the current position and add it if needed.

ScanAnchor ( bool isAlias ) : Token
ScanBlockScalar ( bool isLiteral ) : Token

Scan a block scalar.

ScanBlockScalarBreaks ( int currentIndent, StringBuilder breaks, YamlDotNet.Core.Mark start, YamlDotNet.Core.Mark &end ) : int

Scan intendation spaces and line breaks for a block scalar. Determine the intendation level if needed.

ScanDirective ( ) : Token

Scan a YAML-DIRECTIVE or TAG-DIRECTIVE token. Scope: %YAML 1.1 # a comment \n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ %TAG !yaml! tag:yaml.org,2002: \n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

ScanDirectiveName ( YamlDotNet.Core.Mark start ) : string

Scan the directive name. Scope: %YAML 1.1 # a comment \n ^^^^ %TAG !yaml! tag:yaml.org,2002: \n ^^^

ScanFlowScalar ( bool isSingleQuoted ) : Token

Scan a quoted scalar.

ScanPlainScalar ( ) : Token

Scan a plain scalar.

ScanTag ( ) : Token

Scan a TAG token.

ScanTagDirectiveValue ( YamlDotNet.Core.Mark start ) : Token

Scan the value of a TAG-DIRECTIVE token. Scope: %TAG !yaml! tag:yaml.org,2002: \n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

ScanTagHandle ( bool isDirective, YamlDotNet.Core.Mark start ) : string

Scan a tag handle.

ScanTagUri ( string head, YamlDotNet.Core.Mark start ) : string

Scan a tag.

ScanToNextToken ( ) : void
ScanUriEscapes ( YamlDotNet.Core.Mark start ) : string

Decode an URI-escape sequence corresponding to a single UTF-8 character.

ScanVersionDirectiveNumber ( YamlDotNet.Core.Mark start ) : int

Scan the version number of VERSION-DIRECTIVE. Scope: %YAML 1.1 # a comment \n ^ %YAML 1.1 # a comment \n ^

ScanVersionDirectiveValue ( YamlDotNet.Core.Mark start ) : Token

Scan the value of VERSION-DIRECTIVE. Scope: %YAML 1.1 # a comment \n ^^^^^^

Skip ( ) : void
SkipLine ( ) : void
SkipWhitespaces ( ) : void
StaleSimpleKeys ( ) : void

Check the list of potential simple keys and remove the positions that cannot contain simple keys anymore.

StartsWith ( StringBuilder what, char start ) : bool
UnrollIndent ( int column ) : void

Pop indentation levels from the indents stack until the current level becomes less or equal to the column. For each intendation level, append the BLOCK-END token.

Method Details

ConsumeCurrent() public méthode

Consumes the current token and increments the parsed token count
public ConsumeCurrent ( ) : void
Résultat void

MoveNext() public méthode

Moves to the next token.
public MoveNext ( ) : bool
Résultat bool

MoveNextWithoutConsuming() public méthode

public MoveNextWithoutConsuming ( ) : bool
Résultat bool

Scanner() public méthode

Initializes a new instance of the Scanner class.
public Scanner ( TextReader input, bool skipComments = true ) : System
input TextReader The input.
skipComments bool Indicates whether comments should be ignored
Résultat System