Provides methods to set metered key. More...

Inherits Object.

Public Member Functions

 Metered ()
 Initializes a new instance of this class. More...
 
void SetMeteredKey (System::String publicKey, System::String privateKey)
 Sets metered public and private key. If you purchase metered license, when start application, this API should be called, normally, this is enough. However, if always fail to upload consumption data and exceed 24 hours, 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. More...
 
System::String GetProductName ()
 

Static Public Member Functions

static bool get_IsBillingServiceRun ()
 
static System::Decimal GetConsumptionQuantity ()
 Gets consumption file size More...
 
static System::Decimal GetConsumptionCredit ()
 Gets consumption credit More...
 
static bool IsMeteredLicensed ()
 Check whether metered is licensed More...
 
static void IncreaseCredit ()
 Increases the credit. More...
 
static void SetConsumption (System::Decimal dataSize)
 Sets the data consumption. More...
 
static bool IsPluginLicensed ()
 

Detailed Description

Provides methods to set metered key.

In this example, an attempt will be made to set metered public and private key

<ms>

[C#]
@verbatim
Metered matered = new Metered();
matered.SetMeteredKey("PublicKey", "PrivateKey");
[Visual Basic]
Dim matered As Metered = New Metered
matered.SetMeteredKey("PublicKey", "PrivateKey")
@endverbatim

</ms>

<java> the component jar file:

Metered matered = new Metered();
matered.setMeteredKey("PublicKey", "PrivateKey");

</java>

Constructor & Destructor Documentation

◆ Metered()

Aspose::Email::Metered::Metered ( )

Initializes a new instance of this class.

Member Function Documentation

◆ get_IsBillingServiceRun()

static bool Aspose::Email::Metered::get_IsBillingServiceRun ( )
static

◆ GetConsumptionCredit()

static System::Decimal Aspose::Email::Metered::GetConsumptionCredit ( )
static

Gets consumption credit

Returns
consumption quantity

◆ GetConsumptionQuantity()

static System::Decimal Aspose::Email::Metered::GetConsumptionQuantity ( )
static

Gets consumption file size

Returns
consumption quantity

◆ GetProductName()

System::String Aspose::Email::Metered::GetProductName ( )

◆ IncreaseCredit()

static void Aspose::Email::Metered::IncreaseCredit ( )
static

Increases the credit.

◆ IsMeteredLicensed()

static bool Aspose::Email::Metered::IsMeteredLicensed ( )
static

Check whether metered is licensed

Returns
True or false

◆ IsPluginLicensed()

static bool Aspose::Email::Metered::IsPluginLicensed ( )
static

◆ SetConsumption()

static void Aspose::Email::Metered::SetConsumption ( System::Decimal  dataSize)
static

Sets the data consumption.

Parameters
dataSizeData size in bytes.

◆ SetMeteredKey()

void Aspose::Email::Metered::SetMeteredKey ( System::String  publicKey,
System::String  privateKey 
)

Sets metered public and private key. If you purchase metered license, when start application, this API should be called, normally, this is enough. However, if always fail to upload consumption data and exceed 24 hours, 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.

Parameters
publicKeypublic key
privateKeyprivate key
Metered()
Initializes a new instance of this class.
@ NoAuthentication
No authentication