public static void Export(IYAMLDocExportable @object, StreamWriter streamWriter, bool withMetaInfo) { YAMLWriter yamlWriter = new YAMLWriter(); yamlWriter.IsWriteVersion = withMetaInfo; yamlWriter.IsWriteDefaultTag = withMetaInfo; YAMLDocument document = @object.ExportYAMLDocument(); yamlWriter.Add(document); yamlWriter.Write(streamWriter); }
public static void Export(IEnumerable <IYAMLDocExportable> objects, StreamWriter streamWriter, bool withMetaInfo) { YAMLWriter yamlWriter = new YAMLWriter(); yamlWriter.IsWriteVersion = withMetaInfo; yamlWriter.IsWriteDefaultTag = withMetaInfo; foreach (IYAMLDocExportable docExport in objects) { YAMLDocument document = docExport.ExportYAMLDocument(); yamlWriter.Add(document); } yamlWriter.Write(streamWriter); }