Exemplo n.º 1
0
        public void ToYaml(TextWriter yaml, YamlNode node, YamlConfig config)
        {
            this.config = config;
            this.yaml   = yaml;
            MarkMultiTimeAppearingChildNodesToBeAnchored(node);
            yaml.NewLine = config.LineBreakForOutput;

            column = 1;
            raw    = 1;
            WriteLine("%YAML 1.2");
            WriteLine("---");
            NodeToYaml(node, "", Context.Normal);
            WriteLine("...");
        }
Exemplo n.º 2
0
 public void ToYaml(Stream s, YamlNode node, YamlConfig config)
 {
     using (var yaml = new StreamWriter(s))
         ToYaml(yaml, node, config);
 }
Exemplo n.º 3
0
 public string ToYaml(YamlNode node, YamlConfig config)
 {
     yaml = new StringWriter();
     ToYaml(yaml, node, config);
     return(yaml.ToString());
 }