メーター付きライセンス
Contents
[
Hide
]Aspose.CAD は、開発者がメーター付きキーを適用できるようにします。これは新しいライセンスメカニズムです。新しいライセンスメカニズムは、既存のライセンス方法と併用されます。API機能の使用に基づいて請求されることを希望する顧客は、メーター付きライセンスを使用できます。詳細については、メーター付きライセンス FAQ セクションを参照してください。
メーター付きライセンス
メータークラスを使用するための簡単な手順は次のとおりです。
- メータークラスのインスタンスを作成します。
- 公開キーと秘密キーを SetMeteredKey メソッドに渡します。
- 処理を行います(タスクを実行します)。
- メータークラスの GetConsumptionQuantity メソッドを呼び出します。
- これまでに消費した API リクエストの量/数量が返されます。
以下は、メーター付きの公開鍵と秘密鍵を設定する方法を示すサンプルコードです。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Access the setMeteredKey property and pass public and private keys as parameters | |
Aspose.CAD.Metered.SetMeteredKey("PublicKey", "PrivateKey"); | |
// Get metered data amount before calling API | |
decimal amountbefore = Aspose.CAD.Metered.GetConsumptionQuantity(); | |
// Display information | |
Console.WriteLine("Amount Consumed Before: " + amountbefore.ToString()); | |
// Do processing | |
//Aspose.CAD.FileFormats.Cad.CadImage image = (Aspose.CAD.FileFormats.Cad.CadImage)Aspose.CAD.Image.load("BlockRefDgn.dwg"); | |
// Get metered data amount After calling API | |
decimal amountafter = Aspose.CAD.Metered.GetConsumptionQuantity(); | |
// Display information | |
Console.WriteLine("Amount Consumed After: " + amountafter.ToString()); | |