Class Metered

Class Metered

Namespace: Aspose.Tasks
Assembly: Aspose.Tasks.dll (25.2.0)

Provides methods to set metered key.

public class Metered

Inheritance

objectMetered

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”);


## Constructors

### <a id="Aspose_Tasks_Metered__ctor"></a> Metered\(\)

```csharp
public Metered()

Methods

GetConsumptionCredit()

Gets consumption credit.

public static decimal GetConsumptionCredit()

Returns

decimal

Returns the number of consumed credit points.

GetConsumptionQuantity()

Gets consumption file size.

public static decimal GetConsumptionQuantity()

Returns

decimal

Returns the number of consumed bytes.

IsLicensed()

Checks whether the product is successfully licensed using Metered license.

public bool IsLicensed()

Returns

bool

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.