由于 Portable.Licensing 中缺少文档,我想知道生成许可证时 .WithMaximumUtilization(1) 会做什么? 这是否意味着许可证允许安装 1 次?如果是这种情况,如何验证?
var license = License.New()
.WithUniqueIdentifier(Guid.NewGuid())
.As(LicenseType.Trial)
.ExpiresAt(DateTime.Now.AddDays(30))
.WithMaximumUtilization(1) // What does this do?
.WithProductFeatures(new Dictionary<string, string>
{
{"Sales Module", "yes"},
{"Purchase Module", "yes"},
{"Maximum Transactions", "10000"}
})
.LicensedTo("John Doe", "john.doe@example.com")
.CreateAndSignWithPrivateKey(privateKey, passPhrase);
最佳答案
该值刚刚分配给 license.Quantity
属性。
您可以在验证许可证时随意使用它。
关于c# - 在 asp.net Portable.Licensing 中,.WithMaximumUtilization(1) 的含义和用途是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51961644/