Class Metered
Class Metered
Namespace: Aspose.BarCode
Assembly: Aspose.BarCode.dll (25.1.0)
提供设置计量密钥的方法。
public class Metered
继承
继承成员
object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
示例
在此示例中,将尝试设置计量的公共和私有密钥
Metered matered = new Metered();
matered.SetMeteredKey("PublicKey", "PrivateKey");
Dim matered As Metered = New Metered
matered.SetMeteredKey("PublicKey", "PrivateKey")
构造函数
Metered()
public Metered()
方法
GetConsumptionCredit()
获取消费积分
public static decimal GetConsumptionCredit()
返回
消费数量
GetConsumptionQuantity()
获取消费文件大小
public static decimal GetConsumptionQuantity()
返回
消费数量
GetProductName()
获取许可产品名称
public string GetProductName()
返回
产品名称
IsMeteredLicensed()
检查计量是否已获得许可
public static bool IsMeteredLicensed()
返回
真或假
SetMeteredKey(string, string)
设置计量的公共和私有密钥。 如果您购买了计量许可证,当启动应用程序时,应调用此API,通常这就足够了。 但是,如果始终无法上传消费数据并超过24小时,许可证将被设置为评估状态, 为避免这种情况,您应定期检查许可证状态,如果是评估状态,请再次调用此API。
public void SetMeteredKey(string publicKey, string privateKey)
参数
publicKey
string
公共密钥
privateKey
string
私有密钥