C# Класс Bari.Core.Model.Loader.YamlParser

Helper methods for parsing YAML files, with support of goal-based filtering
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
EnumerateNamedNodesOf ( YamlNode parent, string groupName ) : YamlNode>>.IEnumerable

Finds a child node by its name and enumerates its contents

EnumerateNodesOf ( YamlMappingNode mapping ) : YamlNode>>.IEnumerable

Enumerates the key-value pairs in a mapping node

EnumerateNodesOf ( YamlSequenceNode seq ) : IEnumerable

Enumerates the nodes in a sequence node while resolving the conditional expressions

GetOptionalScalarValue ( YamlNode parent, string key, string defaultValue ) : string

Gets an optional scalar value identified by its key

GetScalarValue ( YamlNode parent, string key, string errorMessage = null ) : string

Gets a scalar value identified by its key

SetActiveGoal ( Goal goal ) : void

Sets the active goal to be used for filtering the nodes

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

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

Finds a child node by its name and enumerates its contents
public EnumerateNamedNodesOf ( YamlNode parent, string groupName ) : YamlNode>>.IEnumerable
parent YamlDotNet.RepresentationModel.YamlNode Parent node
groupName string Name of the group to find
Результат YamlNode>>.IEnumerable

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

Enumerates the key-value pairs in a mapping node
public EnumerateNodesOf ( YamlMappingNode mapping ) : YamlNode>>.IEnumerable
mapping YamlMappingNode Mapping node to be enumerated
Результат YamlNode>>.IEnumerable

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

Enumerates the nodes in a sequence node while resolving the conditional expressions
public EnumerateNodesOf ( YamlSequenceNode seq ) : IEnumerable
seq YamlSequenceNode Sequence node to be enumerated
Результат IEnumerable

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

Gets an optional scalar value identified by its key
public GetOptionalScalarValue ( YamlNode parent, string key, string defaultValue ) : string
parent YamlDotNet.RepresentationModel.YamlNode Parent node
key string Key of the value
defaultValue string Default value to be used if the key is not found in parent
Результат string

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

Gets a scalar value identified by its key
public GetScalarValue ( YamlNode parent, string key, string errorMessage = null ) : string
parent YamlDotNet.RepresentationModel.YamlNode Parent node
key string Key of the value
errorMessage string Error message if the key does not exists
Результат string

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

Sets the active goal to be used for filtering the nodes
public SetActiveGoal ( Goal goal ) : void
goal Goal New active goal
Результат void