C# Class FiftyOne.Foundation.Mobile.Detection.LicenceKey

Static class used to manage the activate licence keys.
Datei anzeigen Open project: 51Degrees/dotNET-Device-Detection

Private Properties

Property Type Description
AddKeysFromFile void
CheckConfig void
IsKeyFormatValid bool

Public Methods

Method Description
Activate ( Stream stream ) : LicenceKeyResults

Activates the data pointed to by the stream.

Activate ( byte data ) : LicenceKeyResults

Activates the data array containing the premium data.

Activate ( string licenceKey ) : LicenceKeyResults

Activates the licence key provided.

AddKey ( string key ) : void

Adds a licence key to the list of available licence keys at runtime. This method can be used by 3rd party assemblies to set licence keys.

Private Methods

Method Description
AddKeysFromFile ( List list, string fileName ) : void

Adds the valid licence keys from the files provided.

CheckConfig ( ) : void

Checks

IsKeyFormatValid ( string key ) : bool

Returns true if the key format is valid. i.e. it contains only upper case letters and numbers.

Method Details

Activate() public static method

Activates the data pointed to by the stream.
public static Activate ( Stream stream ) : LicenceKeyResults
stream Stream Stream to data to activate
return LicenceKeyResults

Activate() public static method

Activates the data array containing the premium data.
public static Activate ( byte data ) : LicenceKeyResults
data byte Data to activate
return LicenceKeyResults

Activate() public static method

Activates the licence key provided.
public static Activate ( string licenceKey ) : LicenceKeyResults
licenceKey string Licence key
return LicenceKeyResults

AddKey() public static method

Adds a licence key to the list of available licence keys at runtime. This method can be used by 3rd party assemblies to set licence keys.
public static AddKey ( string key ) : void
key string Valid licence key
return void