Click or drag to resize
XmlLicenseBuilder Class
Provides a custom constructor and validation for XML licenses. This class cannot be inherited.
Inheritance Hierarchy
SystemObject
  Babel.LicensingXmlLicenseBuilder

Namespace:  Babel.Licensing
Assemblies:   Babel.Licensing (in Babel.Licensing.dll) Version: 2.4.0.0
  Babel.Licensing (in Babel.Licensing.dll) Version: 2.4.0.0
Syntax
public class XmlLicenseBuilder : ILicenseBuilder, 
	ICreateCustomRestriction, ICreateCustomSignatureProvider, IReadableLicenseString

The XmlLicenseBuilder type exposes the following members.

Constructors
  NameDescription
Public methodXmlLicenseBuilder
Create a new instance of XmlLicenseBuilder class.
Public methodXmlLicenseBuilder(ISignatureProvider)
Create a new instance of XmlLicenseBuilder class with the specified ISignatureProvider signature provider.
Top
Properties
  NameDescription
Public propertyHasSignature
Indicates whether the license has a signature.
Public propertyCode exampleSignatureProvider
Gets or sets the signature provider. The signature provider is used to sign and verify the integrity of the license data.
Top
Methods
  NameDescription
Public methodAddOrUpdate
Adds a ILicense with a given key Id to the builder if the license does not already exists, or updates the ILicense if the key already exists.
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodLoad(Stream)
Loads the license from the specified stream.
Public methodLoad(String)
Loads the license from the given file.
Public methodLoadXml
Loads the license from the specified XML document.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodParse
Parse the specified XML license string.
Public methodRemove
Removes a ILicense with a given key Id from the XmlLicenseBuilder.
Public methodCode exampleSave(Stream)
Saves the current license state to the specified stream.
Public methodSave(String)
Saves the current license state to a given file.
Public methodSign
Add a signature to the current license object.
Public methodToLicenses
Converts this object to a ILicense object.
Public methodToReadableString
Creates and returns a string representation of the current XML license.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodToXml
Converts this instance to an XML string.
Public methodValidate
Validates the current license signature. This method doesn't validate license restrictions. Is not meant to be used to validate the license in client applications. To validate the license in client applications use the XmlLicenseManager class.
Top
Events
  NameDescription
Public eventCode exampleCreateCustomRestriction
Event queue for all listeners interested in CreateCustomRestriction events.
Public eventCreateCustomSignatureProvider
Event queue for all listeners interested in CreateCustomSignatureProvider events.
Top
Extension Methods
  NameDescription
Public Extension MethodLoad
An extension method that loads the license from a given file.
(Defined by Licenseable.)
Public Extension MethodSignWith
An extension method used to sign the current license state with a given signature provider.
(Defined by Licenseable.)
Public Extension MethodSignWithKeys
An extension method used to sign the current license state with a given key pair.
(Defined by Licenseable.)
Public Extension MethodToReadableString
An ILicenseBuilder extension method that converts the current license to a readable string.
(Defined by Licenseable.)
Public Extension MethodValidateSignature
An extension method that validates the current license signature.
(Defined by Licenseable.)
Top
See Also