This how we could do that :
For Developer (Design Time) :
if (System.ComponentModel.LicenseManager.CurrentContext.UsageMode ==
System.ComponentModel.LicenseUsageMode.Designtime)
{
throw new System.Exception("Design Time License Required");
}
For run time :
if (System.ComponentModel.LicenseManager.CurrentContext.UsageMode == System.ComponentModel.LicenseUsageMode.Runtime)
{
throw new System.Exception("Run Time License Required");
}
For more details you can refer to these links :
0 comments:
Post a Comment