Metered

Metered class

提供设置计量键的方法。

public sealed class Metered : IDisposable

构造函数

姓名描述
Metered()初始化Metered类.

方法

姓名描述
Dispose()执行与释放、释放或重置非托管资源相关的应用程序定义任务。
SetMeteredKey(string, string)设置计量的公钥和私钥
static GetConsumptionCredit()获得消费信用。
static GetConsumptionQuantity()获取消费文件大小。

例子

在此示例中,将尝试设置计量的公钥和私钥

[C#]

Metered matered = new Metered();
matered.SetMeteredKey("PublicKey", "PrivateKey");


[Visual Basic]

Dim matered As Metered = New Metered
matered.SetMeteredKey("PublicKey", "PrivateKey")

组件 jar 文件:

Metered matered = new Metered();
matered.setMeteredKey("PublicKey", "PrivateKey");

也可以看看