SerialManager

Namespace: Babel.Licensing Assembly: Babel.Licensing.dll

This class is used to validate serials and get object from serials. This class cannot be inherited.

public sealed class SerialManager

Inheritance

objectSerialManager

Inherited Members

object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Constructors

SerialManager()

Initializes a new instance of the class.

public SerialManager()

Properties

PublicKey

Gets or sets the public key used to validate serials.

public string PublicKey { get; set; }

Property Value

string

Methods

IsValid(string)

Query if the serial specified is valid.

public bool IsValid(string serial)

Parameters

NameDescription

serial string

The serial as base32 string. The serial can include '-' characters.

Returns

NameDescription

true if the serial is valid, otherwise false.

Exceptions

NameDescription

Thrown when the argument serial is null.

Validate(string, Type, object)

Validates the given serial and returns a object if the serial is valid.

public StringLicense Validate(string serial, Type type = null, object instance = null)

Parameters

NameDescription

serial string

The serial as base32 string. The serial can include '-' characters.

type Type

The type.

instance object

The instance.

Returns

NameDescription

A object if the serial is valid, otherwise

Exceptions

NameDescription

Thrown when one or more required arguments are null.

Thrown when a Babel License error condition occurs.

Last updated