C# Class YAML.Parser

Class for parsing YAML files.
Mostra file Open project: agardiner/hfmcmd

Protected Properties

Property Type Description
_log log4net.ILog
_preprocessor Preprocessor
_stack Stack

Public Methods

Method Description
ParseFile ( string fileName, object>.Dictionary variables ) : Node

Attempts to parse the YAML file contents of templateFile into a YAML Node object.

Protected Methods

Method Description
ParseValue ( string key, string value ) : Node

Converts a string value to a string, int or boolean type.

ProcessDictionaryElement ( Node context, string line ) : Node

Processes the current line into an existing Dictionary.

ProcessLine ( string line ) : void

Process a single line of text into the Node that is the current context.

ProcessListElement ( Node context, string line ) : Node

Processes the current line into an existing list.

Method Details

ParseFile() public method

Attempts to parse the YAML file contents of templateFile into a YAML Node object.
public ParseFile ( string fileName, object>.Dictionary variables ) : Node
fileName string
variables object>.Dictionary
return Node

ParseValue() protected method

Converts a string value to a string, int or boolean type.
protected ParseValue ( string key, string value ) : Node
key string
value string The string that is to be parsed.
return Node

ProcessDictionaryElement() protected method

Processes the current line into an existing Dictionary.
protected ProcessDictionaryElement ( Node context, string line ) : Node
context Node Node containing the Dictionary to which the /// element should be added.
line string The line containing the key: value pair.
return Node

ProcessLine() protected method

Process a single line of text into the Node that is the current context.
protected ProcessLine ( string line ) : void
line string
return void

ProcessListElement() protected method

Processes the current line into an existing list.
protected ProcessListElement ( Node context, string line ) : Node
context Node Node containing the list to which the /// element should be added.
line string The line containing the list element (complete /// with leading '-').
return Node

Property Details

_log protected_oe static_oe property

protected static ILog,log4net _log
return log4net.ILog

_preprocessor protected_oe property

protected Preprocessor,YAML _preprocessor
return Preprocessor

_stack protected_oe property

protected Stack _stack
return Stack