C# Класс Yaml.Node

Node in the Yaml tree
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
nodetype NodeType
uri string

Открытые методы

Метод Описание
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

Защищенные методы

Метод Описание
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.

Описание методов

FromFile() публичный статический Метод

Parse a Yaml string from a textfile and return a Yaml tree
public static FromFile ( string filename ) : Node
filename string
Результат Node

Info() публичный абстрактный Метод

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
Результат Node

Node() публичный Метод

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
Результат System

Parse() защищенный статический Метод

Parse function
protected static Parse ( ParseStream stream ) : Node
stream ParseStream
Результат Node

Parse() защищенный статический Метод

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. ///
Результат Node

Parse() публичный статический Метод

Parse a Yaml string from a textreader and return a Yaml tree
public static Parse ( TextReader textreader ) : Node
textreader TextReader
Результат Node

Parse() публичный статический Метод

Parse a Yaml string and return a Yaml tree
public static Parse ( string lines ) : Node
lines string
Результат Node

ToFile() публичный Метод

Write a YAML tree to a file using UTF-8 encoding
public ToFile ( string filename ) : void
filename string
Результат void

ToFile() публичный Метод

Write a YAML tree to a file
public ToFile ( string filename, Encoding enc ) : void
filename string
enc System.Text.Encoding
Результат void

ToString() публичный абстрактный Метод

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
Результат string

Write() публичный Метод

Return a Yaml string
public Write ( ) : string
Результат string

Write() защищенный Метод

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
Результат void

Описание свойств

nodetype защищенное свойство

Determines wich node we are talking about
protected NodeType nodetype
Результат NodeType

uri защищенное свойство

The uri given by http://yaml.org/type/
protected string uri
Результат string