Interface ILicenseProvider
Defines methods for license checks.
Namespace: Sartorius.SAF.Licensing.Revenera
Assembly: Sartorius.SAF.Licensing.Revenera.dll
Syntax
public interface ILicenseProvider : IDisposable
Properties
View SourceHardwareId
Gets the unique hardware id.
Declaration
string HardwareId { get; }
Property Value
Type | Description |
---|---|
System.String |
WorkingStoragePath
Working storage path, the where the license file stored
Declaration
string WorkingStoragePath { get; }
Property Value
Type | Description |
---|---|
System.String |
Methods
View SourceActivateLicenseId(String, String)
Activate a license key online.
Declaration
ActivationInfo ActivateLicenseId(string licenseServerUrl, string activationId)
Parameters
Type | Name | Description |
---|---|---|
System.String | licenseServerUrl | A back office Url. |
System.String | activationId | A license activation key. |
Returns
Type | Description |
---|---|
ActivationInfo |
Exceptions
Type | Condition |
---|---|
ActivationKeyException | The license could not be activate. |
CheckInFeature(String, String)
Check in the feature.
Declaration
int CheckInFeature(string featureName, string version)
Parameters
Type | Name | Description |
---|---|---|
System.String | featureName | The identifier of the feature to check in. |
System.String | version | The version of the feature to check in. |
Returns
Type | Description |
---|---|
System.Int32 | A count of returned licenses. |
Exceptions
Type | Condition |
---|---|
FeatureNotFoundException | The feature with the specified id does not exist. |
CheckInFeature(String, String, Int32)
Check in the feature.
Declaration
int CheckInFeature(string featureName, string version, int count)
Parameters
Type | Name | Description |
---|---|---|
System.String | featureName | The identifier of the feature to check in. |
System.String | version | The version of the feature to check in. |
System.Int32 | count | The count of licenses to check out for the specified feature. |
Returns
Type | Description |
---|---|
System.Int32 | A count of returned licenses. |
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException |
|
FeatureNotFoundException | The feature with the specified id does not exist. |
CheckOutFeature(String, String)
Check out feature.
Declaration
CheckoutInfo CheckOutFeature(string featureName, string version)
Parameters
Type | Name | Description |
---|---|---|
System.String | featureName | The identifier of the feature to check in. |
System.String | version | The version of the feature to check in. |
Returns
Type | Description |
---|---|
CheckoutInfo | A info of check out operation. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
FeatureNotFoundException | The feature with the specified id does not exist. |
CheckOutFeature(String, String, Int32)
Check out feature.
Declaration
CheckoutInfo CheckOutFeature(string featureName, string version, int count)
Parameters
Type | Name | Description |
---|---|---|
System.String | featureName | The identifier of the feature to check in. |
System.String | version | The version of the feature to check in. |
System.Int32 | count | The count of licenses to check in for the specified feature. |
Returns
Type | Description |
---|---|
CheckoutInfo | A info of check out operation. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
System.ArgumentOutOfRangeException |
|
FeatureNotFoundException | The feature with the specified id does not exist. |
DeactivateLicenseId(String, String)
Deactivate a license via online
Declaration
void DeactivateLicenseId(string licenseServerUrl, string activationId)
Parameters
Type | Name | Description |
---|---|---|
System.String | licenseServerUrl | |
System.String | activationId |
Exceptions
Type | Condition |
---|---|
ActivationKeyException | The license could not be activate. |
ExportOfflineActivationFile(String, String)
Create a license file to activate a product (offline)
Declaration
string ExportOfflineActivationFile(string activationId, string outputPath)
Parameters
Type | Name | Description |
---|---|---|
System.String | activationId | A license activation key. |
System.String | outputPath |
Returns
Type | Description |
---|---|
System.String | A file name. |
Exceptions
Type | Condition |
---|---|
OfflineActivationException | The license file could not be accessed. |
ExportOfflineActivationFile(String, String, Int32)
Create a license file to activate a product (offline)
Declaration
string ExportOfflineActivationFile(string activationId, string outputPath, int count)
Parameters
Type | Name | Description |
---|---|---|
System.String | activationId | A license activation key. |
System.String | outputPath | |
System.Int32 | count | The count of licenses to check in for the specified feature. |
Returns
Type | Description |
---|---|
System.String | A file name. |
Exceptions
Type | Condition |
---|---|
OfflineActivationException | The license file could not be accessed. |
GetFeatureInfo(String, String)
Gets feature info for given feature name and version.
Declaration
FeatureInfo GetFeatureInfo(string featureName, string version)
Parameters
Type | Name | Description |
---|---|---|
System.String | featureName | A feature name. |
System.String | version | A feature version. Can be null |
Returns
Type | Description |
---|---|
FeatureInfo | A instance of FeatureInfofeature info |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Throw if parameter featureName is null or empty. |
GetFeaturesInfo(Boolean)
Gets all features info.
Declaration
IEnumerable<FeatureInfo> GetFeaturesInfo(bool diagnostic = false)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | diagnostic | If true, get all license info, even if the license has expired |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<FeatureInfo> | A list of FeatureInfo |
Exceptions
Type | Condition |
---|---|
FeatureException | The feature info does not exist. |
ImportOfflineActivationResponseFile(String)
Import response file, ot activate license
Declaration
ActivationInfo ImportOfflineActivationResponseFile(string responseFile)
Parameters
Type | Name | Description |
---|---|---|
System.String | responseFile | A absolute file name to license file. |
Returns
Type | Description |
---|---|
ActivationInfo |
Exceptions
Type | Condition |
---|---|
OfflineActivationException | The license file could not be accessed. |