/// <summary> /// Returns the YAML representation of a <see cref="Zone"/>. /// </summary> public static string ToYaml(this Zone zone) { if (zone == null) { throw new ArgumentNullException(nameof(zone)); } var writer = new StringWriter(); return(writer.SerializeYaml(zone).ToString()); }
/// <summary> /// Returns the YAML representation of a collection of <see cref="DnsRecord"/>. /// </summary> public static string ToYaml(this IEnumerable <DnsRecord> dnsRecords, string containerName = null) { if (dnsRecords == null) { throw new ArgumentNullException(nameof(dnsRecords)); } var writer = new StringWriter(); return(writer.SerializeYaml(dnsRecords, containerName).ToString()); }