MeteredSetMeteredKey Method |
Namespace: Aspose.Words
// 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()}");