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("..."); }
public void ToYaml(Stream s, YamlNode node, YamlConfig config) { using (var yaml = new StreamWriter(s)) ToYaml(yaml, node, config); }
public string ToYaml(YamlNode node, YamlConfig config) { yaml = new StringWriter(); ToYaml(yaml, node, config); return(yaml.ToString()); }