FormatElement Event
Reports the XML element that is currently being processed.
Syntax
public event OnFormatElementHandler OnFormatElement; public delegate void OnFormatElementHandler(object sender, XmlsignerFormatElementEventArgs e); public class XmlsignerFormatElementEventArgs : EventArgs { public string StartTagWhitespace { get; set; } public string EndTagWhitespace { get; set; } public int Level { get; } public string Path { get; } public bool HasChildElements { get; } }
Public Event OnFormatElement As OnFormatElementHandler Public Delegate Sub OnFormatElementHandler(sender As Object, e As XmlsignerFormatElementEventArgs) Public Class XmlsignerFormatElementEventArgs Inherits EventArgs Public Property StartTagWhitespace As String Public Property EndTagWhitespace As String Public ReadOnly Property Level As Integer Public ReadOnly Property Path As String Public ReadOnly Property HasChildElements As Boolean End Class
Remarks
Path and Level specify the path to the XML element being processed and its nesting level, respectively.
HasChildElements specify if processed XML element has child elements.
Among other purposes, this event may be used to add whitespace formatting before or after a particular element in the signature.