Class MeteredLicense

Class MeteredLicense

名称: Aspose.Zip 收藏: Aspose.Zip.dll (25.5.0)

提供设置测量密钥的方法。

public class MeteredLicense

Inheritance

object MeteredLicense

继承人

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")
```</ms><java>
the component jar file:

```csharp
Metered metered = new Metered();
metered.setMeteredKey("PublicKey", "PrivateKey");
```</java>

## Constructors

### <a id="Aspose_Zip_MeteredLicense__ctor"></a> MeteredLicense\(\)

```csharp
public MeteredLicense()

Methods

GetConsumptionCredit()

得到消费信用。

public static decimal GetConsumptionCredit()

Returns

decimal

返回消耗的信用点数量。

GetConsumptionQuantity()

获取消费文件大小。

public static decimal GetConsumptionQuantity()

Returns

decimal

返回消耗的比特数量。

ResetMeteredKey()

删除以前设置许可证。

public void ResetMeteredKey()

SetMeteredKey(字符串, string)

设置公共和私人密钥。

public void SetMeteredKey(string publicKey, string privateKey)

Parameters

publicKey string

公共钥匙。

privateKey string

个人钥匙。

Remarks

如果您购买测量许可证,则该 API 应该在应用程序启动时被召唤,通常,这就足够了。但是,如果测量未能在24小时内上传消费数据,则许可证将设置为评估状态。为了避免这种情况,您应该定期检查许可证状态 如果是评估状态,请再次呼叫此API。

 中文