分类:
redis
/// 取消限制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); }
评价