去除 ServiceStack.Redis 的6000次限制。

方法一、

下载

https://github.com/ServiceStack/ServiceStack.Text

修改LicenseUtils.cs文件中的AssertValidUsage

var licensedFeatures = ActivatedLicenseFeatures();

后面添加   return;

方法二、调用下面的代码之后就没有了限制

var licenseKey = new LicenseKey()
{
Ref = "pedoc",
Expiry = DateTime.Now.AddDays( * ),
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[];
var key = constructorInfo.Invoke(new object[] { licenseKey });
field.SetValue(null, key);
var licenceAll = LicenseUtils.HasLicensedFeature(LicenseFeature.All);
Debug.Assert(licenceAll);
上一篇:Nginx学习笔记(二)


下一篇:java设计模式---状态模式