Better optional attributes

This commit is contained in:
Matt Nadareski
2020-08-23 22:54:09 -07:00
parent f8fae70231
commit fd489d5e4b
6 changed files with 223 additions and 385 deletions

View File

@@ -13,7 +13,7 @@ namespace SabreTools.Library.IO
/// <param name="writer">XmlTextWriter to write out with</param>
/// <param name="localName">Name of the attribute</param>
/// <param name="value">Value to write in the attribute</param>
public static void WriteAttributeStringIfExists(this XmlTextWriter writer, string localName, string value)
public static void WriteOptionalAttributeString(this XmlTextWriter writer, string localName, string value)
{
if (string.IsNullOrEmpty(value))
writer.WriteAttributeString(localName, value);