רישוי מדוד
Contents
[
Hide
]Aspose.CAD מאפשרת למפתחים להחיל מפתח מדוד. זהו מנגנון רישוי חדש. מנגנון הרישוי החדש ישמש יחד עם שיטת הרישוי הקיימת. לקוחות שמעוניינים להחייב על בסיס שימוש בפיצ’רים של ה-API יכולים להשתמש ברישוי המדוד. למידע נוסף, אנא התייחסו לחלק שאלות נפוצות על רישוי מדוד.
רישוי מדוד
הנה הצעדים הפשוטים לשימוש במחלקת Metered.
- צור מופע של מחלקת Metered.
- העבר מפתחות ציבוריים ופרטיים למתודת SetMeteredKey.
- עשה עיבוד (בצע משימה).
- קרא למתודת GetConsumptionQuantity של מחלקת Metered.
- היא תחזיר את כמות/מספר הבקשות ל-API שצרכת עד כה.
להלן דוגמת קוד המדגימה כיצד להחיל מפתח ציבורי ופרטי מדוד.
This file contains hidden or 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()); | |