Class Metered
نام ها : Aspose.Note جمع آوری: WL31_.dll (25.4.0)
روش هایی برای تنظیم کلیدهای اندازه گیری شده فراهم می کند.
public class Metered
Inheritance
اعضای ارثی
object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()
Examples
در این مثال، تلاش برای قرار دادن کلیدهای عمومی و خصوصی مشخص خواهد شد.
Metered metered = new Metered();
metered.SetMeteredKey("PublicKey", "PrivateKey");
Dim metered As Metered = New Metered
metered.SetMeteredKey("PublicKey", "PrivateKey")
نشان می دهد که چگونه برای تنظیم مجوز اندازه گیری شده.
Metered metered = new Metered();
metered.SetMeteredKey("MyPublicKey", "MyPrivateKey");
Console.WriteLine($"Credit before operation: {Metered.GetConsumptionCredit():F2}");
Console.WriteLine($"Consumption quantity before operation: {Metered.GetConsumptionQuantity():F2}");
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_Pages();
// Load OneNote document and get first child
Document document = new Document(Path.Combine(dataDir, "Aspose.one"));
document.Save(Path.Combine(dataDir, "MeteredLicense.pdf"));
Console.WriteLine($"Credit before operation: {Metered.GetConsumptionCredit():F2}");
Console.WriteLine($"Consumption quantity before operation: {Metered.GetConsumptionQuantity():F2}");
Constructors
Metered()
public Metered()
Methods
GetConsumptionCredit()
وام مصرفی دریافت می کند.
public static decimal GetConsumptionCredit()
Returns
بازگرداندن تعداد امتیازات اعتباری مصرف شده
GetConsumptionQuantity()
حجم فایل مصرف را دریافت کنید.
public static decimal GetConsumptionQuantity()
Returns
بازگرداندن تعداد بایت های مصرف شده
ResetMeteredKey()
مجوز نصب قبلی را حذف کنید.
public void ResetMeteredKey()
SetMeteredKey(String، String)
کلیدهای عمومی و خصوصی را نصب کنید.
public void SetMeteredKey(string publicKey, string privateKey)
Parameters
publicKey
string
کلید عمومی است.
privateKey
string
کلید خصوصی
Examples
نشان می دهد که چگونه برای تنظیم مجوز اندازه گیری شده.
Metered metered = new Metered();
metered.SetMeteredKey("MyPublicKey", "MyPrivateKey");
Console.WriteLine($"Credit before operation: {Metered.GetConsumptionCredit():F2}");
Console.WriteLine($"Consumption quantity before operation: {Metered.GetConsumptionQuantity():F2}");
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_Pages();
// Load OneNote document and get first child
Document document = new Document(Path.Combine(dataDir, "Aspose.one"));
document.Save(Path.Combine(dataDir, "MeteredLicense.pdf"));
Console.WriteLine($"Credit before operation: {Metered.GetConsumptionCredit():F2}");
Console.WriteLine($"Consumption quantity before operation: {Metered.GetConsumptionQuantity():F2}");
Remarks
اگر شما یک مجوز اندازه گیری خریداری می کنید، این API باید در راه اندازی برنامه تماس گرفته شود، به طور معمول، این کافی است.با این حال، در صورت عدم بارگذاری داده های مصرفی در مدت 24 ساعت، مجوز به وضعیت ارزیابی تنظیم می شود.برای جلوگیری از چنین مواردی، شما باید به طور منظم وضعیت مجوز را بررسی کنید اگر این وضعیت ارزیابی است، این API را دوباره تماس بگیرید.