Class Metered
ชื่อพื้นที่: Aspose.Html การประกอบ: Aspose.HTML.dll (25.4.0)
ให้วิธีการในการตั้งค่ากุญแจวัด
[ComVisible(true)]
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 matered = new Metered();
matered.SetMeteredKey("PublicKey", "PrivateKey");
Dim matered As Metered = New Metered
matered.SetMeteredKey("PublicKey", "PrivateKey")
```</ms><java>
the component jar file:
```csharp
Metered matered = new Metered();
matered.setMeteredKey("PublicKey", "PrivateKey");
```</java>
## Constructors
### <a id="Aspose_Html_Metered__ctor"></a> Metered\(\)
Initializes a new instance of this class.
```csharp
public Metered()
Methods
GetConsumptionCredit()
รับเครดิตการบริโภค
public static decimal GetConsumptionCredit()
Returns
จํานวนการบริโภค
GetConsumptionQuantity()
รับขนาดไฟล์การบริโภค
public static decimal GetConsumptionQuantity()
Returns
จํานวนการบริโภค
IsMeteredLicensed()
ตรวจสอบว่าเมตเตอร์ได้รับอนุญาต
public static bool IsMeteredLicensed()
Returns
จริงหรือผิด
SetMeteredKey(รั้ว, รั้ว)
เก็บคีย์สาธารณะและส่วนตัวหากคุณซื้อใบอนุญาตที่วัดเมื่อเริ่มต้นการใช้งาน API นี้ควรเรียกว่าปกตินี้เพียงพออย่างไรก็ตามหากไม่สามารถอัปโหลดข้อมูลการบริโภคได้ตลอดเวลาและเกิน 24 ชั่วโมงใบอนุญาตจะถูกกําหนดไว้ในสถานะการประเมินเพื่อหลีกเลี่ยงกรณีดังกล่าวคุณควรตรวจสอบสถานะใบอนุญาตอย่างเป็นประจําถ้ามันเป็นสถานะการประเมินเรียก API นี้อีกครั้ง
public void SetMeteredKey(string publicKey, string privateKey)
Parameters
publicKey
string
คีย์สาธารณะ
privateKey
string
คีย์ส่วนตัว