Class Metered
Class Metered
Namespace: Aspose.Page
Assembly: Aspose.Page.dll (25.1.2)
提供设置计量密钥的方法。
public class Metered
继承
继承的成员
object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
示例
在此示例中,将尝试设置计量的公钥和私钥。
Metered metered = new Metered();
metered.SetMeteredKey("PublicKey", "PrivateKey");
Dim metered As Metered = New Metered
metered.SetMeteredKey("PublicKey", "PrivateKey")
构造函数
Metered()
初始化此类的新实例。
public Metered()
方法
GetConsumptionCredit()
获取消费信用
public static decimal GetConsumptionCredit()
返回
消费数量
GetConsumptionQuantity()
获取消费文件大小
public static decimal GetConsumptionQuantity()
返回
消费数量
SetMeteredKey(string, string)
设置计量的公钥和私钥。 如果您购买了计量许可证,则在启动应用程序时应调用此API,通常这就足够了。 但是,如果始终无法上传消费数据并超过24小时,许可证将被设置为评估状态, 为了避免这种情况,您应该定期检查许可证状态,如果它处于评估状态,请再次调用此API。
public void SetMeteredKey(string publicKey, string privateKey)
参数
publicKey
string
公钥
privateKey
string
私钥