Click or drag to resize
StringLicenseBuilder Class
This class is used to generate encoded license strings. This class cannot be inherited.
Inheritance Hierarchy
SystemObject
  Babel.LicensingStringLicenseBuilder

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 sealed class StringLicenseBuilder : ILicenseBuilder, 
	ICreateCustomRestriction, ICreateCustomSignatureProvider, IReadableLicenseString

The StringLicenseBuilder type exposes the following members.

Constructors
  NameDescription
Public methodCode exampleStringLicenseBuilder
Create a new instance of StringLicenseBuilder class.
Public methodStringLicenseBuilder(ISignatureProvider)
Create a new instance of StringLicenseBuilder class with the given signature provider.
Top
Properties
  NameDescription
Public propertyFormat
Gets or sets the StringFormat used to generate the license.
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 StringLicenseBuilder 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.)
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 file.
Public methodLoad(TextReader)
Loads the license from the given text reader.
Public methodParse
Parse the input license string. If the string is not a valid encoded license string, it throws a BabelLicenseException.
Public methodRemove
Removes a ILicense with a given key Id from the StringLicenseBuilder.
Public methodCode exampleSave(Stream)
Saves the current license state to the specified file.
Public methodSave(TextWriter)
Saves the current license using the given TextWriter.
Public methodSetMask
Sets the mask used to generate the license.
Public methodCode exampleSetMaskSize
Sets the mask size used to randomize the generated license.
Public methodSign
Add a signature to the current license object.
Public methodToLicenses
Converts this object to a ILicense object.
Public methodToReadableString
Converts the current license state to a readable string.
Public methodToString
Returns an encoded string that represents the current license.
(Overrides ObjectToString.)
Public methodToString(String)
Returns an encoded license string according to the format specified.
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 StringLicenseManager class.
Top
Events
  NameDescription
Public eventCreateCustomRestriction
Event queue for all listeners interested in CreateCustomRestriction events.
Public eventCode exampleCreateCustomSignatureProvider
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