C# Class Yaml.Node

Node in the Yaml tree
Exibir arquivo Open project: rs-services/RightGridWindowsImplementation Class Usage Examples

Protected Properties

Property Type Description
nodetype NodeType
uri string

Public Methods

Method Description
FromFile ( string filename ) : Node

Parse a Yaml string from a textfile and return a Yaml tree

Info ( ) : Node

Node info returns a YAML node and is also mostly used for debugging the parser. This could be used for traversing the meta-info of another YAML tree

Node ( string uri, NodeType nodetype ) : System

Node Constructor

Parse ( TextReader textreader ) : Node

Parse a Yaml string from a textreader and return a Yaml tree

Parse ( string lines ) : Node

Parse a Yaml string and return a Yaml tree

ToFile ( string filename ) : void

Write a YAML tree to a file using UTF-8 encoding

ToFile ( string filename, Encoding enc ) : void

Write a YAML tree to a file

ToString ( ) : string

The ToString method here, and in all the classses derived from this class, is used mainly for debugging purpose. ToString returns a xml-like textual representation of the objects. It's very useful to see how a Yaml document has been parsed because of the disambiguous representation of this notation.

Write ( ) : string

Return a Yaml string

Protected Methods

Method Description
Parse ( ParseStream stream ) : Node

Parse function

Parse ( ParseStream stream, bool parseImplicitMappings ) : Node

Internal parse method

Write ( WriteStream stream ) : void

Writes a Yaml tree back to a file or stream

should not be called from outside the parser. This method is only public from inside the Sequence and Mapping Write methods.

Method Details

FromFile() public static method

Parse a Yaml string from a textfile and return a Yaml tree
public static FromFile ( string filename ) : Node
filename string
return Node

Info() public abstract method

Node info returns a YAML node and is also mostly used for debugging the parser. This could be used for traversing the meta-info of another YAML tree
public abstract Info ( ) : Node
return Node

Node() public method

Node Constructor
public Node ( string uri, NodeType nodetype ) : System
uri string URI of the node
nodetype NodeType The type of node that we want to store
return System

Parse() protected static method

Parse function
protected static Parse ( ParseStream stream ) : Node
stream ParseStream
return Node

Parse() protected static method

Internal parse method
protected static Parse ( ParseStream stream, bool parseImplicitMappings ) : Node
stream ParseStream
parseImplicitMappings bool /// Avoids ethernal loops while parsing implicit mappings. Implicit mappings are /// not rocognized by a leading character. So while trying to parse the key of /// something we think that could be a mapping, we're sure that if it is a mapping, /// the key of this implicit mapping is not a mapping itself. /// /// NOTE: Implicit mapping still belong to unstable code and require the UNSTABLE and /// IMPLICIT_MAPPINGS preprocessor flags. ///
return Node

Parse() public static method

Parse a Yaml string from a textreader and return a Yaml tree
public static Parse ( TextReader textreader ) : Node
textreader TextReader
return Node

Parse() public static method

Parse a Yaml string and return a Yaml tree
public static Parse ( string lines ) : Node
lines string
return Node

ToFile() public method

Write a YAML tree to a file using UTF-8 encoding
public ToFile ( string filename ) : void
filename string
return void

ToFile() public method

Write a YAML tree to a file
public ToFile ( string filename, Encoding enc ) : void
filename string
enc System.Text.Encoding
return void

ToString() public abstract method

The ToString method here, and in all the classses derived from this class, is used mainly for debugging purpose. ToString returns a xml-like textual representation of the objects. It's very useful to see how a Yaml document has been parsed because of the disambiguous representation of this notation.
public abstract ToString ( ) : string
return string

Write() public method

Return a Yaml string
public Write ( ) : string
return string

Write() protected method

Writes a Yaml tree back to a file or stream
should not be called from outside the parser. This method is only public from inside the Sequence and Mapping Write methods.
protected Write ( WriteStream stream ) : void
stream WriteStream Were the output data go's
return void

Property Details

nodetype protected_oe property

Determines wich node we are talking about
protected NodeType nodetype
return NodeType

uri protected_oe property

The uri given by http://yaml.org/type/
protected string uri
return string