IdGenerator
Namespace: Babel.Licensing Assembly: Babel.Licensing.dll
A license identifier generator. This class cannot be inherited.
Inheritance
Inherited Members
object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Constructors
IdGenerator(string, int)
Generate a new instance of class specifying the identifier prefix and length.
Parameters
Exceptions
Name | Description |
---|---|
Thrown when the prefix argument is null. | |
Thrown when the length argument is less or equal to zero. |
IdGenerator(string)
Generate a new instance of class specifying the identifier prefix.
Parameters
Name | Description |
---|---|
| The identifier prefix. |
Examples
IdGenerator()
Generate a new instance of class.
Examples
Properties
Format
Gets or sets the format to use.
Property Value
Length
Gets or sets the identifier length.
Property Value
Exceptions
Name | Description |
---|---|
Thrown when one or more arguments are outside the required range. |
Prefix
Gets or sets the identifier prefix.
Property Value
Exceptions
Name | Description |
---|---|
Thrown when one or more required arguments are null. |
Methods
Create(string, int)
Creates a new identifier string with given prefix.
Parameters
Returns
Name | Description |
---|---|
A string. |
CreateId()
Creates the a new identifier string.
Returns
Name | Description |
---|---|
The new identifier. |
Last updated