使用Portable.Licensing如何验证属性硬件ID

时间:2016-02-17 07:33:36

标签: c# licensing

我正在研究某个项目。我只需要将产品的许可证提供给一台计算机,所以我添加了一个额外的属性硬件ID,如图所示。如何验证它。在这方面帮助我。感谢..

var license = Portable.Licensing.License.New()
                   .WithUniqueIdentifier(Guid.NewGuid())
                   .As(Portable.Licensing.LicenseType.Trial)
                   .ExpiresAt(DateTime.Now.AddDays(5))
                   .WithMaximumUtilization(Int32.Parse(User.Text))
                   .WithAdditionalAttributes(new Dictionary<String,String>{
                                               {"Hardware ID","12343"}
                                                })
                   .LicensedTo(name.Text, email.Text)
                   .CreateAndSignWithPrivateKey(privateKey, "212555555");

1 个答案:

答案 0 :(得分:3)

我找到了这个非常简单的答案。

  1. 使用Portable.Licencing提供的#config/routes.rb resources :home, only: [] do get :home_download_pdf, on: :collection #-> url.com/home/home_download_pdf end 方法。 例如: -

    AssertThat()
  2. 编写您自己的验证案例。