Class Metered

Class Metered

İsim alanı : Aspose.Note Toplama: Aspose.Note.dll (25.4.0)

Anahtarı belirlemek için yöntemler sağlar.

public class Metered

Inheritance

object Metered

mirasçı üyeleri

object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()

Examples

Bu örnekte, belirlenmiş kamu ve özel anahtarı belirlemek için bir deneme yapılacaktır

Metered metered = new Metered();
metered.SetMeteredKey("PublicKey", "PrivateKey");
Dim metered As Metered = New Metered
metered.SetMeteredKey("PublicKey", "PrivateKey")

Nasıl ölçülen lisansı ayarlayacağınızı gösterin.

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()

Tüketici kredisi alınır.

public static decimal GetConsumptionCredit()

Returns

decimal

Kullanılan kredi puanlarının sayısını geri getirir.

GetConsumptionQuantity()

Tüketim dosyası boyutunu alır.

public static decimal GetConsumptionQuantity()

Returns

decimal

Kullanılan bayt sayısını geri getirir.

ResetMeteredKey()

Önceden kurulum lisansı kaldırılır.

public void ResetMeteredKey()

SetMeteredKey(String ve String)

Özel ve kamu anahtarları.

public void SetMeteredKey(string publicKey, string privateKey)

Parameters

publicKey string

Halk anahtarı

privateKey string

Özel anahtar

Examples

Nasıl ölçülen lisansı ayarlayacağınızı gösterin.

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

Eğer ölçülen lisans satın alırsanız, bu API uygulama başlangıçta çağırılmalıdır, normalde, bu yeterlidir.Ancak, ölçülen 24 saat boyunca tüketim verilerini yüklemeyi başaramazsa, lisans değerlendirme durumuna ayarlanır. böyle bir durumdan kaçınmak için, düzenli olarak lisans durumunu kontrol etmelisiniz. değerlendirme durumunda, bu API’yi tekrar arayın.

 Türkçe