MeteredGetConsumptionCredit Method
Gets consumption credit

Namespace: Aspose.Words
Assembly: Aspose.Words (in Aspose.Words.dll) Version: 19.12
Syntax
public static decimal GetConsumptionCredit()

Return Value

Type: Decimal
consumption quantity
Examples
Shows how to activate a Metered license and track credit/consumption.
// Set a public and private key for a new Metered instance
Metered metered = new Metered();
metered.SetMeteredKey("MyPublicKey", "MyPrivateKey");

// Print credit/usage 
Console.WriteLine($"Credit before operation: {Metered.GetConsumptionCredit()}");
Console.WriteLine($"Consumption quantity before operation: {Metered.GetConsumptionQuantity()}");

// Do something
Document doc = new Document(MyDir + "Document.doc");

// Print credit/usage to see how much was spent
Console.WriteLine($"Credit after operation: {Metered.GetConsumptionCredit()}");
Console.WriteLine($"Consumption quantity after operation: {Metered.GetConsumptionQuantity()}");
See Also