MeteredGetConsumptionCredit Method

Gets consumption credit

Namespace:  Aspose.Words
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 20.7.0

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.docx");

// 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