<PackageReference Include="NLog" Version="6.1.0" />

NLog.Layouts.XmlAttribute

public class XmlAttribute
XML attribute.
public Layout DefaultValue { get; set; }

Gets or sets the fallback value when result value is not available

public bool Encode { get; set; }

Gets or sets whether output should be encoded with Xml-string escaping, or be treated as valid xml-attribute-value

public bool IncludeEmptyValue { get; set; }

Gets or sets whether empty attribute value should be included in the output.

public Layout Layout { get; set; }

Gets or sets the layout used for rendering the attribute value.

public string Name { get; set; }

Gets or sets the name of the attribute.

public Type ValueType { get; set; }

Gets or sets the result value type, for conversion of layout rendering output

public XmlAttribute()

Initializes a new instance of the XmlAttribute class.

public XmlAttribute(string name, Layout layout)

Initializes a new instance of the XmlAttribute class.

public XmlAttribute(string name, Layout layout, bool encode)

Initializes a new instance of the XmlAttribute class.