DeployLX Software Protection System

Limit..::..WriteToXml Method

Persists the Limit to the XML writer.

Syntax

Protected MustOverride Function WriteToXml ( _
	writer As XmlWriter, _
	signing As LicenseSaveType _
) As Boolean
protected abstract bool WriteToXml(
	XmlWriter writer,
	LicenseSaveType signing
)

Parameters

writer
The writer to save to.
signing
Indicates if the license is being saved for signing and volatile data should be excluded.

Return Value

Returns true if the write was successful, otherwise false.

Examples

This sample demonstrates how to persist a limit's properties to the XML writer.
Visual Basic
Protected Overrides Function WriteToXml(ByVal writer As System.Xml.XmlWriter, ByVal signing As LicenseSaveType) As Boolean
    If _variableName Is Nothing Then
        Return False
    End If

    If _variableValue Is Nothing Then
        Return False
    End If

    writer.WriteAttributeString("variableName", _variableName)
    writer.WriteAttributeString("variableValue", _variableValue)

    ' Any child limits will automatically be written to the XML.
    Return True
End Function
C#
protected override bool WriteToXml( System.Xml.XmlWriter writer, LicenseSaveType signing )
{
    if( _variableName == null )
        return false;

    if( _variableValue == null )
        return false;

    writer.WriteAttributeString( "variableName", _variableName );
    writer.WriteAttributeString( "variableValue", _variableValue );

    // Any child limits will automatically be written to the XML.
    return true;
}

Assembly:  DeployLX.Licensing.v5 (in DeployLX.Licensing.v5.dll)

See Also