
- /// 取消限制redis添加量
- /// </summary>
- public static void cancelimit()
- {
- var licenseKey = new LicenseKey()
- {
- Ref = "pedoc",
- Expiry = DateTime.Now.AddDays(365 * 5),
- Hash = string.Empty,
- Name = "pedoc",
- Type = LicenseType.Enterprise
- };
- var field = typeof(LicenseUtils).GetField("__activatedLicense",
- BindingFlags.Static | BindingFlags.NonPublic);
- var keyType = field.FieldType;
- var constructorInfos = keyType.GetConstructors(BindingFlags.Instance | BindingFlags.NonPublic);
- var constructorInfo = constructorInfos[0];
- var key = constructorInfo.Invoke(new object[] { licenseKey });
- field.SetValue(null, key);
- var licenceAll = LicenseUtils.HasLicensedFeature(LicenseFeature.All);
- Debug.Assert(licenceAll);
- }
评价
排名
20
文章
32
粉丝
7
评论
21
ICP备案 :渝ICP备18016597号-1
网站信息:2018-2025TNBLOG.NET
技术交流:群号656732739
联系我们:contact@tnblog.net
公网安备:
50010702506256


欢迎加群交流技术
剑轩
反射~