Increments the usage by the given amount.
Namespace: CelloSaaS.ServiceContracts.LicenseManagementAssembly: CelloSaaS.ServiceContracts (in CelloSaaS.ServiceContracts.dll) Version: 4.3.1.0 (4.3.1.0)
Syntax
Parameters
- tenantId
- Type: System String
Tenant Identifier(Mandatory)
- usageCode
- Type: System String
Usage Code(Mandatory)
- amount
- Type: System Double
Usage Amount
Return Value
Type: BooleanThe True/False value
Exceptions
Exception | Condition |
---|---|
System ArgumentNullException | If any mandatory argument is null or empty |
System ArgumentException | If any argument is producing error |
CelloSaaS.ServiceContracts.LicenseManagement LicenseException | If any error occurs in this method |
CelloSaaS.ServiceContracts.UserManagement LicenseLimitException | If the usage limit exceeds |
Examples
public void IncrementMeterUsage() { string tenantId = UserIdentity.TenantID; string usageCode = "SampleUsage"; double amount = 1.0; IMeteringService meteringService = ServiceLocator.Resolve<IMeteringService>(); bool incrementedUsage = meteringService.IncrementMeterUsage(tenantId, usageCode, amount); }
See Also