Class Metered
Class Metered
Namespace: Aspose.OCR
Assembly: Aspose.OCR.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()
返回
消费数量。
SetMeteredKey(string, string)
设置计量的公钥和私钥。 如果您购买了计量许可证,当启动应用程序时,应调用此 API,通常,这就足够了。 但是,如果始终无法上传消费数据并超过 24 小时,许可证将被设置为评估状态, 为了避免这种情况,您应该定期检查许可证状态,如果是评估状态,请再次调用此 API。
public void SetMeteredKey(string publicKey, string privateKey)
参数
publicKey
string
公钥
privateKey
string
私钥