Class MeteredLicense
Namespace: Aspose.Zip
Assembly: Aspose.Zip.dll (25.2.0)
Provides methods to set metered key.
public class MeteredLicense
Inheritance
Inherited Members
object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Examples
In this example, an attempt will be made to set metered public and private key
Metered metered = new Metered();
metered.SetMeteredKey("PublicKey", "PrivateKey");
Dim metered As Metered = New Metered
metered.SetMeteredKey("PublicKey", "PrivateKey")
```</ms><java>
the component jar file:
```csharp
Metered metered = new Metered();
metered.setMeteredKey("PublicKey", "PrivateKey");
```</java>
## Constructors
### <a id="Aspose_Zip_MeteredLicense__ctor"></a> MeteredLicense\(\)
```csharp
public MeteredLicense()
Methods
GetConsumptionCredit()
Gets consumption credit.
public static decimal GetConsumptionCredit()
Returns
Returns the number of consumed credit points.
GetConsumptionQuantity()
Gets consumption file size.
public static decimal GetConsumptionQuantity()
Returns
Returns the number of consumed bytes.
ResetMeteredKey()
Removes previously setup license.
public void ResetMeteredKey()
SetMeteredKey(string, string)
Sets metered public and private keys.
public void SetMeteredKey(string publicKey, string privateKey)
Parameters
publicKey
string
The public key.
privateKey
string
The private key.
Remarks
If you purchase metered license, this API should be called on application startup, normally, this is enough. However, if metered fails to upload consumption data during 24 hours period, the license will be set to evaluation status. To avoid such case, you should regularly check the license status If it is evaluation status, call this API again.