ILicenseService ValidateUsageLicense Method CelloSaaS API Documentation
This method is used to validate license for usage limit of tenant.

Namespace: CelloSaaS.ServiceContracts.LicenseManagement
Assembly: CelloSaaS.ServiceContracts (in CelloSaaS.ServiceContracts.dll) Version: 4.3.1.0 (4.3.1.0)
Syntax

string ValidateUsageLicense(
	string usageType,
	string usageCode,
	double amount,
	string tenantId
)

Parameters

usageType
Type: System String
Usage Type(Mandatory)
usageCode
Type: System String
Usage Name((Mandatory)
amount
Type: System Double
Usage Amount(Mandatory - Not less than or equal to zero)
tenantId
Type: System String
Tenant Identifier(Mandatory)

Return Value

Type: String
The Usage Status
Exceptions

ExceptionCondition
System ArgumentNullExceptionThrows ArgumentNullException if any mandatory argument is null or empty
CelloSaaS.ServiceContracts.LicenseManagement LicenseExceptionThrows LicenseException if any errors occurs in module license validate
Examples

public void ValidateUsageLicense()
{
    string usageType = "BlockUsage";
    string usageCode = "CompanyUsage";
    double amount = 2;
    string tenantId = "B590CD25-3093-DF11-8DEB-001EC9DAB123";
    ILicenseService licenseService = ServiceLocator.Resolve<ILicenseService>();
    bool validUsage = licenseService.ValidateUsageLicense(usageType, usageName, amount, tenantId);
}
See Also