/// <summary> /// Gets a read-only copy of the current object. /// </summary> /// <returns></returns> public XmlConverterOptions AsReadOnly() { XmlConverterOptions copy = (XmlConverterOptions)MemberwiseClone(); copy.isReadOnly = true; return(copy); }
public XmlToYamlConverter(XmlDocument document, XmlConverterOptions options) { this.document = document; this.options = options; }
public YamlToXmlDocumentVisitor(XmlConverterOptions options) { this.options = options; }
/// <summary> /// Initializes a new instance of the <see cref="XmlConverter"/> class. /// </summary> /// <param name="options">The options.</param> public XmlConverter(XmlConverterOptions options) { this.options = options.IsReadOnly ? options : options.AsReadOnly(); }
/// <summary> /// Invokes <see cref="XmlConverter.ToXml"/>. /// </summary> public static XmlDocument ToXml(this YamlDocument document, XmlConverterOptions options) { XmlConverter converter = new XmlConverter(options); return converter.ToXml(document); }