Metered Licensing

Metered Licensing

To use the Metered class, do this:

  1. Create an instance of Metered class.

  2. Pass public & private keys to SetMeteredKey method.

  3. Do some processing (perform tasks).

  4. Call the GetConsumptionQuantity method of the Metered class.

    You should see the amount/quantity of API requests you have consumed so far.

This sample code shows you how to set metered public and private keys:

 // Create an instance of CAD Metered class
            Aspose.Slides.Metered metered = new Aspose.Slides.Metered();

            // Access the setMeteredKey property and pass public and private keys as parameters
            metered.SetMeteredKey("*****", "*****");

            // Get metered data amount before calling API
            decimal amountbefore = Aspose.Slides.Metered.GetConsumptionQuantity();

            // Display information
            Console.WriteLine("Amount Consumed Before: " + amountbefore.ToString());
            // Get metered data amount After calling API
            decimal amountafter = Aspose.Slides.Metered.GetConsumptionQuantity();

            // Display information
            Console.WriteLine("Amount Consumed After: " + amountafter.ToString());