Metered Class |
Namespace: Aspose.Words
The Metered type exposes the following members.
Name | Description | |
---|---|---|
![]() ![]() | Metered |
Initializes a new instance of this class.
|
Name | Description | |
---|---|---|
![]() | Equals | (Inherited from Object.) |
![]() ![]() ![]() | GetConsumptionCredit |
Gets consumption credit
|
![]() ![]() ![]() | GetConsumptionQuantity |
Gets consumption file size
|
![]() | GetHashCode | (Inherited from Object.) |
![]() | GetType | (Inherited from Object.) |
![]() ![]() | SetMeteredKey |
Sets metered public and private key
|
![]() | ToString | (Inherited from Object.) |
[C#] Metered matered = new Metered(); matered.SetMeteredKey("PublicKey", "PrivateKey"); [Visual Basic] Dim matered As Metered = New Metered matered.SetMeteredKey("PublicKey", "PrivateKey")
// 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()}");