diff --git a/Yi.Framework/Yi.Framework/Controllers/WeatherForecastController.cs b/Yi.Framework/Yi.Framework.ApiMicroservice/Controllers/WeatherForecastController.cs
similarity index 95%
rename from Yi.Framework/Yi.Framework/Controllers/WeatherForecastController.cs
rename to Yi.Framework/Yi.Framework.ApiMicroservice/Controllers/WeatherForecastController.cs
index 85f9e9ed..021a0750 100644
--- a/Yi.Framework/Yi.Framework/Controllers/WeatherForecastController.cs
+++ b/Yi.Framework/Yi.Framework.ApiMicroservice/Controllers/WeatherForecastController.cs
@@ -5,7 +5,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
-namespace Yi.Framework.Controllers
+namespace Yi.Framework.ApiMicroservice.Controllers
{
[ApiController]
[Route("[controller]")]
diff --git a/Yi.Framework/Yi.Framework/Program.cs b/Yi.Framework/Yi.Framework.ApiMicroservice/Program.cs
similarity index 94%
rename from Yi.Framework/Yi.Framework/Program.cs
rename to Yi.Framework/Yi.Framework.ApiMicroservice/Program.cs
index a67477ef..6543d16f 100644
--- a/Yi.Framework/Yi.Framework/Program.cs
+++ b/Yi.Framework/Yi.Framework.ApiMicroservice/Program.cs
@@ -7,7 +7,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
-namespace Yi.Framework
+namespace Yi.Framework.ApiMicroservice
{
public class Program
{
diff --git a/Yi.Framework/Yi.Framework/Properties/launchSettings.json b/Yi.Framework/Yi.Framework.ApiMicroservice/Properties/launchSettings.json
similarity index 86%
rename from Yi.Framework/Yi.Framework/Properties/launchSettings.json
rename to Yi.Framework/Yi.Framework.ApiMicroservice/Properties/launchSettings.json
index 6758692d..394d1b04 100644
--- a/Yi.Framework/Yi.Framework/Properties/launchSettings.json
+++ b/Yi.Framework/Yi.Framework.ApiMicroservice/Properties/launchSettings.json
@@ -4,8 +4,8 @@
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
- "applicationUrl": "http://localhost:52790",
- "sslPort": 44379
+ "applicationUrl": "http://localhost:56243",
+ "sslPort": 44329
}
},
"profiles": {
@@ -17,7 +17,7 @@
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
- "Yi.Framework": {
+ "Yi.Framework.ApiMicroservice": {
"commandName": "Project",
"dotnetRunMessages": "true",
"launchBrowser": true,
diff --git a/Yi.Framework/Yi.Framework/Startup.cs b/Yi.Framework/Yi.Framework.ApiMicroservice/Startup.cs
similarity index 91%
rename from Yi.Framework/Yi.Framework/Startup.cs
rename to Yi.Framework/Yi.Framework.ApiMicroservice/Startup.cs
index 90cf0fbd..d2e6dcb3 100644
--- a/Yi.Framework/Yi.Framework/Startup.cs
+++ b/Yi.Framework/Yi.Framework.ApiMicroservice/Startup.cs
@@ -12,7 +12,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
-namespace Yi.Framework
+namespace Yi.Framework.ApiMicroservice
{
public class Startup
{
@@ -30,7 +30,7 @@ namespace Yi.Framework
services.AddControllers();
services.AddSwaggerGen(c =>
{
- c.SwaggerDoc("v1", new OpenApiInfo { Title = "Yi.Framework", Version = "v1" });
+ c.SwaggerDoc("v1", new OpenApiInfo { Title = "Yi.Framework.ApiMicroservice", Version = "v1" });
});
}
@@ -41,7 +41,7 @@ namespace Yi.Framework
{
app.UseDeveloperExceptionPage();
app.UseSwagger();
- app.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/v1/swagger.json", "Yi.Framework v1"));
+ app.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/v1/swagger.json", "Yi.Framework.ApiMicroservice v1"));
}
app.UseHttpsRedirection();
diff --git a/Yi.Framework/Yi.Framework/WeatherForecast.cs b/Yi.Framework/Yi.Framework.ApiMicroservice/WeatherForecast.cs
similarity index 87%
rename from Yi.Framework/Yi.Framework/WeatherForecast.cs
rename to Yi.Framework/Yi.Framework.ApiMicroservice/WeatherForecast.cs
index 149144ca..a317faba 100644
--- a/Yi.Framework/Yi.Framework/WeatherForecast.cs
+++ b/Yi.Framework/Yi.Framework.ApiMicroservice/WeatherForecast.cs
@@ -1,6 +1,6 @@
using System;
-namespace Yi.Framework
+namespace Yi.Framework.ApiMicroservice
{
public class WeatherForecast
{
diff --git a/Yi.Framework/Yi.Framework/Yi.Framework.csproj b/Yi.Framework/Yi.Framework.ApiMicroservice/Yi.Framework.ApiMicroservice.csproj
similarity index 100%
rename from Yi.Framework/Yi.Framework/Yi.Framework.csproj
rename to Yi.Framework/Yi.Framework.ApiMicroservice/Yi.Framework.ApiMicroservice.csproj
diff --git a/Yi.Framework/Yi.Framework/appsettings.Development.json b/Yi.Framework/Yi.Framework.ApiMicroservice/appsettings.Development.json
similarity index 100%
rename from Yi.Framework/Yi.Framework/appsettings.Development.json
rename to Yi.Framework/Yi.Framework.ApiMicroservice/appsettings.Development.json
diff --git a/Yi.Framework/Yi.Framework/appsettings.json b/Yi.Framework/Yi.Framework.ApiMicroservice/appsettings.json
similarity index 100%
rename from Yi.Framework/Yi.Framework/appsettings.json
rename to Yi.Framework/Yi.Framework.ApiMicroservice/appsettings.json
diff --git a/Yi.Framework/Yi.Framework.Common/Class1.cs b/Yi.Framework/Yi.Framework.Common/Class1.cs
new file mode 100644
index 00000000..0c3f5493
--- /dev/null
+++ b/Yi.Framework/Yi.Framework.Common/Class1.cs
@@ -0,0 +1,8 @@
+using System;
+
+namespace Yi.Framework.Common
+{
+ public class Class1
+ {
+ }
+}
diff --git a/Yi.Framework/Yi.Framework.Common/IOCOptions/ElasticSearchOptions.cs b/Yi.Framework/Yi.Framework.Common/IOCOptions/ElasticSearchOptions.cs
new file mode 100644
index 00000000..9eca69cd
--- /dev/null
+++ b/Yi.Framework/Yi.Framework.Common/IOCOptions/ElasticSearchOptions.cs
@@ -0,0 +1,14 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Yi.Common.IOCOptions
+{
+ public class ElasticSearchOptions
+ {
+ public string Url { get; set; }
+ public string IndexName { get; set; }
+ }
+}
diff --git a/Yi.Framework/Yi.Framework.Common/IOCOptions/JWTTokenOptions.cs b/Yi.Framework/Yi.Framework.Common/IOCOptions/JWTTokenOptions.cs
new file mode 100644
index 00000000..1ecad49a
--- /dev/null
+++ b/Yi.Framework/Yi.Framework.Common/IOCOptions/JWTTokenOptions.cs
@@ -0,0 +1,32 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace CC.ElectronicCommerce.Common.IOCOptions
+{
+ public class JWTTokenOptions
+ {
+ public string Audience
+ {
+ get;
+ set;
+ }
+ public string SecurityKey
+ {
+ get;
+ set;
+ }
+ //public SigningCredentials Credentials
+ //{
+ // get;
+ // set;
+ //}
+ public string Issuer
+ {
+ get;
+ set;
+ }
+ }
+}
diff --git a/Yi.Framework/Yi.Framework.Common/IOCOptions/KafkaOptions.cs b/Yi.Framework/Yi.Framework.Common/IOCOptions/KafkaOptions.cs
new file mode 100644
index 00000000..89b3a440
--- /dev/null
+++ b/Yi.Framework/Yi.Framework.Common/IOCOptions/KafkaOptions.cs
@@ -0,0 +1,15 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace CC.ElectronicCommerce.Common.IOCOptions
+{
+ public class KafkaOptions
+ {
+
+ public string BrokerList { get; set; }
+ public string TopicName { get; set; }
+ }
+}
diff --git a/Yi.Framework/Yi.Framework.Common/IOCOptions/MySqlConnOptions.cs b/Yi.Framework/Yi.Framework.Common/IOCOptions/MySqlConnOptions.cs
new file mode 100644
index 00000000..f6a981f0
--- /dev/null
+++ b/Yi.Framework/Yi.Framework.Common/IOCOptions/MySqlConnOptions.cs
@@ -0,0 +1,9 @@
+using System;
+
+namespace Yi.Framework.Common.IOCOptions
+{
+ public class MySqlConnOptions
+ {
+ public string Url { get; set; }
+ }
+}
diff --git a/Yi.Framework/Yi.Framework.Common/IOCOptions/RabbitMQOptions.cs b/Yi.Framework/Yi.Framework.Common/IOCOptions/RabbitMQOptions.cs
new file mode 100644
index 00000000..dd716f86
--- /dev/null
+++ b/Yi.Framework/Yi.Framework.Common/IOCOptions/RabbitMQOptions.cs
@@ -0,0 +1,88 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Yi.Framework.Common.IOCOptions
+{
+ public class RabbitMQOptions
+ {
+ /////
+ ///// exchange---queue
+ /////
+ //private static Dictionary RabbitMQ_Mapping = new Dictionary();
+ //private static readonly object RabbitMQOptions_Lock = new object();
+ //public void Init(string exchangeName, string queueName)
+ //{
+ // lock (RabbitMQOptions_Lock)
+ // {
+ // RabbitMQ_Mapping[exchangeName] = queueName;
+ // }
+ //}
+
+ public string HostName { get; set; }
+ public string UserName { get; set; }
+ public string Password { get; set; }
+
+ }
+
+ public class RabbitMQConsumerModel
+ {
+ ///
+ /// 生产者指定,交换机
+ ///
+ public string ExchangeName { get; set; }
+ ///
+ /// 自己起的名字
+ ///
+ public string QueueName { get; set; }
+ }
+
+ public class RabbitMQExchangeQueueName
+ {
+ public static readonly string SKUCQRS_Exchange = "Zhaoxi.MSACormmerce.SKUCQRS.Exchange";
+ public static readonly string SKUCQRS_Queue_StaticPage = "Zhaoxi.MSACormmerce.SKUCQRS.Queue.StaticPage";
+ public static readonly string SKUCQRS_Queue_ESIndex = "Zhaoxi.MSACormmerce.SKUCQRS.Queue.ESIndex";
+
+
+ public static readonly string SKUWarmup_Exchange = "Zhaoxi.MSACormmerce.Warmup.Exchange";
+ public static readonly string SKUWarmup_Queue_StaticPage = "Zhaoxi.MSACormmerce.Warmup.Queue.StaticPage";
+ public static readonly string SKUWarmup_Queue_ESIndex = "Zhaoxi.MSACormmerce.Warmup.Queue.ESIndex";
+
+ ///
+ /// 订单创建后的交换机
+ ///
+ public static readonly string OrderCreate_Exchange = "Zhaoxi.MSACormmerce.OrderCreate.Exchange";
+ public static readonly string OrderCreate_Queue_CleanCart = "Zhaoxi.MSACormmerce.OrderCreate.Queue.CleanCart";
+
+ ///
+ /// 订单创建后的交换机,支付状态的
+ ///
+ public static readonly string OrderPay_Exchange = "Zhaoxi.MSACormmerce.OrderPay.Exchange";
+ public static readonly string OrderPay_Queue_RefreshPay = "Zhaoxi.MSACormmerce.OrderPay.Queue.RefreshPay";
+
+ ///
+ /// 创建订单后的延时队列配置
+ ///
+ public static readonly string OrderCreate_Delay_Exchange = "Zhaoxi.MSACormmerce.OrderCreate.DelayExchange";
+ public static readonly string OrderCreate_Delay_Queue_CancelOrder = "Zhaoxi.MSACormmerce.OrderCreate.DelayQueue.CancelOrder";
+
+ ///
+ /// 秒杀异步的
+ ///
+ public static readonly string Seckill_Exchange = "Zhaoxi.MSACormmerce.Seckill.Exchange";
+ public static readonly string Seckill_Order_Queue = "Zhaoxi.MSACormmerce.Seckill.Order.Queue";
+
+
+ ///
+ /// CAP队列名称
+ ///
+ public const string Order_Stock_Decrease = "RabbitMQ.MySQL.Order-Stock.Decrease";
+ public const string Order_Stock_Resume = "RabbitMQ.MySQL.Order-Stock.Resume";
+ public const string Stock_Logistics = "RabbitMQ.MySQL.Stock-Logistics";
+
+ public const string Pay_Order_UpdateStatus = "RabbitMQ.MySQL.Pay_Order.UpdateStatus";
+ }
+
+}
diff --git a/Yi.Framework/Yi.Framework.Common/IOCOptions/RedisConnOptions.cs b/Yi.Framework/Yi.Framework.Common/IOCOptions/RedisConnOptions.cs
new file mode 100644
index 00000000..031509a3
--- /dev/null
+++ b/Yi.Framework/Yi.Framework.Common/IOCOptions/RedisConnOptions.cs
@@ -0,0 +1,18 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Yi.Framework.Common.IOCOptions
+{
+ public class RedisConnOptions
+ {
+ public string Host { get; set; }
+ public int DB { get; set; } = 0;
+ public int Prot { get; set; }
+ public string Password { get; set; }
+ }
+
+
+}
diff --git a/Yi.Framework/Yi.Framework.Common/Models/LogModel.cs b/Yi.Framework/Yi.Framework.Common/Models/LogModel.cs
new file mode 100644
index 00000000..1c7b779f
--- /dev/null
+++ b/Yi.Framework/Yi.Framework.Common/Models/LogModel.cs
@@ -0,0 +1,18 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Yi.Framework.Common.Models
+{
+ ///
+ /// 写入分布式日志需要的字段
+ ///
+ public class LogModel
+ {
+ public string OriginalClassName { get; set; }
+ public string OriginalMethodName { get; set; }
+ public string Remark { get; set; }
+ }
+}
diff --git a/Yi.Framework/Yi.Framework.Common/Models/Result.cs b/Yi.Framework/Yi.Framework.Common/Models/Result.cs
new file mode 100644
index 00000000..6b7f1e2f
--- /dev/null
+++ b/Yi.Framework/Yi.Framework.Common/Models/Result.cs
@@ -0,0 +1,66 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+
+namespace Yi.Framework.Common.Models
+{
+ ///
+ /// 结果数据
+ ///
+ public class Result
+ {
+ public bool status { get; set; }
+ public int code { get; set; }
+ public string msg { get; set; }
+ public object data { get; set; }
+ public static Result Instance(bool status, string msg)
+ {
+ return new Result() { status = status, code = 500, msg = msg };
+ }
+ public static Result Error(string msg = "fail")
+ {
+ return new Result() { status = false, code = 500, msg = msg };
+ }
+ public static Result Success(string msg = "succeed")
+ {
+ return new Result() { status = true, code = 200, msg = msg };
+ }
+ public Result SetData(object obj)
+ {
+ this.data = obj;
+ return this;
+ }
+ public Result SetCode(int Code)
+ {
+ this.code = Code;
+ return this;
+ }
+ }
+ public class Result
+ {
+ public bool status { get; set; }
+ public int code { get; set; }
+ public string msg { get; set; }
+ public T data { get; set; }
+
+ public static Result Instance(bool status, string msg)
+ {
+ return new Result() { status = status, code = 500, msg = msg };
+ }
+ public static Result Error(string msg = "fail")
+ {
+ return new Result { status = false, code = 500, msg = msg };
+ }
+ public static Result Success(string msg = "succeed")
+ {
+ return new Result { status = true, code = 200, msg = msg };
+ }
+ public Result SetData(T TValue)
+ {
+ this.data = TValue;
+ return this;
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/Yi.Framework/Yi.Framework.Common/Yi.Framework.Common.csproj b/Yi.Framework/Yi.Framework.Common/Yi.Framework.Common.csproj
new file mode 100644
index 00000000..f208d303
--- /dev/null
+++ b/Yi.Framework/Yi.Framework.Common/Yi.Framework.Common.csproj
@@ -0,0 +1,7 @@
+
+
+
+ net5.0
+
+
+
diff --git a/Yi.Framework/Yi.Framework.Core/CacheClientDB.cs b/Yi.Framework/Yi.Framework.Core/CacheClientDB.cs
new file mode 100644
index 00000000..7508d9d4
--- /dev/null
+++ b/Yi.Framework/Yi.Framework.Core/CacheClientDB.cs
@@ -0,0 +1,1074 @@
+using Microsoft.Extensions.Options;
+using ServiceStack;
+using ServiceStack.Redis;
+using ServiceStack.Redis.Pipeline;
+using ServiceStack.Text;
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.IO;
+using CC.ElectronicCommerce.Common.IOCOptions;
+
+namespace CC.ElectronicCommerce.Core
+{
+ public class CacheClientDB : IDisposable
+ {
+ private readonly RedisConnOptions _RedisOptions;
+
+ #region TestRedisCrack
+ //static CacheClientDB()
+ //{
+ // try
+ // {
+ // Parallel.For(0, 10000, (i) =>
+ // {
+ // using (RedisClient client = new RedisClient("192.168.3.254"))
+ // {
+ // client.Set("name" + i, i);
+ // client.Incr("name" + i);
+ // Console.WriteLine(i);
+ // }
+
+ // });
+ // Console.WriteLine("ok");
+
+ // Console.WriteLine("Hello World!");
+ // }
+ // catch (Exception ex)
+ // {
+ // Console.WriteLine(ex.Message);
+ // }
+ //}
+ #endregion
+ public CacheClientDB(IOptionsMonitor jwtTokenOptions)
+ {
+ this._RedisOptions = jwtTokenOptions.CurrentValue;
+ client = new RedisClient(_RedisOptions.Host, _RedisOptions.Prot, _RedisOptions.Password, _RedisOptions.DB);
+ }
+ // 管道模式 三种模式
+ public IRedisClient GetClient()
+ {
+ return client;
+ }
+ private IRedisClient client;
+
+ public void Dispose()
+ {
+
+ this.TryCatchException(delegate
+ {
+ this.client.Dispose();
+ }, string.Empty);
+ }
+ // 为了以后全链路做准备
+ private void TryCatchException(Action action, string key)
+ {
+ try
+ {
+ action();
+ }
+ catch (Exception e)
+ {
+
+ Console.WriteLine(e.Message);
+ }
+ }
+
+ private T TryCatch(Func action, string key)
+ {
+ Stopwatch sw = Stopwatch.StartNew();
+ //Exception ex = null;
+ //bool isError = false;
+ T result;
+ try
+ {
+ result = action();
+ }
+ catch (Exception exinfo)
+ {
+ object p=null;
+ result =(T)p;
+ //isError = true;
+ Console.WriteLine(exinfo);
+
+ }
+ finally
+ {
+
+ sw.Stop();
+
+ }
+
+ return result;
+ }
+
+ private void TryCatch(Action action, string key)
+ {
+
+ Stopwatch sw = Stopwatch.StartNew();
+ //bool isError = false;
+ //Exception ex = null;
+ try
+ {
+ action();
+ }
+ catch (Exception exinfo)
+ {
+
+ //isError = true;
+ Console.WriteLine(exinfo);
+ }
+ finally
+ {
+ sw.Stop();
+
+ }
+ }
+ public bool Add(string key, T value)
+ {
+
+ return this.TryCatch(() => this.client.Add(key, value), key);
+ }
+ ///
+ /// 简单模式 事务模式
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public bool Add(string key, T value, DateTime expiresAt)
+ {
+
+ return this.TryCatch(() => this.client.Add(key, value, expiresAt), key);
+ }
+
+ public bool Add(string key, T value, TimeSpan expiresIn)
+ {
+ return this.TryCatch(() => this.client.Add(key, value, expiresIn), key);
+ }
+
+ public long Decrement(string key, uint amount)
+ {
+ return this.TryCatch(() => this.client.Decrement(key, amount), key);
+ }
+
+ public void FlushAll()
+ {
+ this.TryCatch(delegate
+ {
+ this.client.FlushAll();
+ }, string.Empty);
+ }
+
+ public T Get(string key)
+ {
+ return this.TryCatch(() => this.client.Get(key), key);
+ }
+
+ public IDictionary GetAll(IEnumerable keys)
+ {
+ return this.TryCatch>(() => this.client.GetAll(keys), keys.FirstOrDefault());
+ }
+
+ public long Increment(string key, uint amount)
+ {
+ return this.TryCatch(() => this.client.Increment(key, amount), key);
+ }
+
+ public bool Remove(string key)
+ {
+ return this.TryCatch(() => this.client.Remove(key), key);
+ }
+
+ public void RemoveAll(IEnumerable keys)
+ {
+ this.TryCatch(delegate
+ {
+ this.client.RemoveAll(keys);
+ }, keys.FirstOrDefault());
+ }
+
+ public bool Replace(string key, T value)
+ {
+ return this.TryCatch(() => this.client.Replace(key, value), key);
+ }
+
+ public bool Replace(string key, T value, DateTime expiresAt)
+ {
+ return this.TryCatch(() => this.client.Replace(key, value, expiresAt), key);
+ }
+
+ public bool Replace(string key, T value, TimeSpan expiresIn)
+ {
+ return this.TryCatch(() => this.client.Replace(key, value, expiresIn), key);
+ }
+
+ public bool Set(string key, T value)
+ {
+ return this.TryCatch(() => this.client.Set(key, value), key);
+ }
+
+ public bool Set(string key, T value, DateTime expiresAt)
+ {
+ return this.TryCatch(() => this.client.Set(key, value, expiresAt), key);
+ }
+
+ public bool Set(string key, T value, TimeSpan expiresIn)
+ {
+ return this.TryCatch(() => this.client.Set(key, value, expiresIn), key);
+ }
+
+ public void SetAll(IDictionary values)
+ {
+ this.TryCatch(delegate
+ {
+ this.client.SetAll(values);
+ }, values.Keys.FirstOrDefault());
+ }
+
+
+ public void Delete(T entity) where T : class, new()
+ {
+ this.TryCatch(delegate
+ {
+ this.client.Delete(entity);
+ }, string.Empty);
+ }
+
+ public void DeleteAll() where TEntity : class, new()
+ {
+ this.TryCatch(delegate
+ {
+ this.client.DeleteAll();
+ }, string.Empty);
+ }
+
+ public void DeleteById(object id) where T : class, new()
+ {
+ this.TryCatch(delegate
+ {
+ this.client.DeleteById(id);
+ }, string.Empty);
+ }
+
+ public void DeleteByIds(ICollection ids) where T : class, new()
+ {
+ this.TryCatch(delegate
+ {
+ this.client.DeleteById(ids);
+ }, string.Empty);
+ }
+
+ public T GetById(object id) where T : class, new()
+ {
+ return this.TryCatch(() => this.client.GetById(id), string.Empty);
+ }
+
+ public IList GetByIds(ICollection ids) where T : class, new()
+ {
+ return this.TryCatch>(() => this.client.GetByIds(ids), string.Empty);
+ }
+
+ public T Store(T entity) where T : class, new()
+ {
+ return this.TryCatch(() => this.client.Store(entity), string.Empty);
+ }
+
+ public void StoreAll(IEnumerable entities) where TEntity : class, new()
+ {
+ this.TryCatch(delegate
+ {
+ this.client.StoreAll(entities);
+ }, string.Empty);
+ }
+
+ public void AddItemToList(string listId, string value)
+ {
+ this.TryCatch(delegate
+ {
+ this.client.AddItemToList(listId, value);
+ }, listId);
+ }
+
+ public void AddItemToSet(string setId, string item)
+ {
+ this.TryCatch(delegate
+ {
+ this.client.AddItemToSet(setId, item);
+ }, setId);
+ }
+
+ public bool AddItemToSortedSet(string setId, string value)
+ {
+ return this.TryCatch(() => this.client.AddItemToSortedSet(setId, value), setId);
+ }
+
+ public bool AddItemToSortedSet(string setId, string value, double score)
+ {
+ return this.TryCatch(() => this.client.AddItemToSortedSet(setId, value, score), setId);
+ }
+
+ public void AddRangeToList(string listId, List values)
+ {
+ this.TryCatch(delegate
+ {
+ this.client.AddRangeToList(listId, values);
+ }, listId);
+ }
+
+ public void AddRangeToSet(string setId, List items)
+ {
+ this.TryCatch(delegate
+ {
+ this.client.AddRangeToSet(setId, items);
+ }, setId);
+ }
+
+ public bool AddRangeToSortedSet(string setId, List values, double score)
+ {
+ return this.TryCatch(() => this.client.AddRangeToSortedSet(setId, values, score), setId);
+ }
+
+ public bool AddRangeToSortedSet(string setId, List values, long score)
+ {
+ return this.TryCatch(() => this.client.AddRangeToSortedSet(setId, values, score), setId);
+ }
+
+ public long AppendToValue(string key, string value)
+ {
+ return this.TryCatch(() => this.client.AppendToValue(key, value), key);
+ }
+
+ public string BlockingDequeueItemFromList(string listId, TimeSpan? timeOut)
+ {
+ return this.TryCatch(() => this.client.BlockingDequeueItemFromList(listId, timeOut), listId);
+ }
+
+ public KeyValuePair BlockingDequeueItemFromLists(string[] listIds, TimeSpan? timeOut)
+ {
+ return this.TryCatch>(delegate
+ {
+ ItemRef item = this.client.BlockingDequeueItemFromLists(listIds, timeOut);
+ return new KeyValuePair(item.Id, item.Item);
+ }, listIds[0]);
+ }
+
+ public string BlockingPopAndPushItemBetweenLists(string fromListId, string toListId, TimeSpan? timeOut)
+ {
+ return this.TryCatch(() => this.client.BlockingPopAndPushItemBetweenLists(fromListId, toListId, timeOut), fromListId);
+ }
+
+ public string BlockingPopItemFromList(string listId, TimeSpan? timeOut)
+ {
+ return this.TryCatch(() => this.client.BlockingPopItemFromList(listId, timeOut), listId);
+ }
+
+ public KeyValuePair BlockingPopItemFromLists(string[] listIds, TimeSpan? timeOut)
+ {
+ return this.TryCatch>(delegate
+ {
+ ItemRef item = this.client.BlockingPopItemFromLists(listIds, timeOut);
+ return new KeyValuePair(item.Id, item.Item);
+ }, listIds[0]);
+ }
+
+ public string BlockingRemoveStartFromList(string listId, TimeSpan? timeOut)
+ {
+ return this.TryCatch(() => this.client.BlockingRemoveStartFromList(listId, timeOut), listId);
+ }
+
+ public KeyValuePair BlockingRemoveStartFromLists(string[] listIds, TimeSpan? timeOut)
+ {
+ return this.TryCatch>(delegate
+ {
+ ItemRef item = this.client.BlockingRemoveStartFromLists(listIds, timeOut);
+ return new KeyValuePair(item.Id, item.Item);
+ }, listIds[0]);
+ }
+
+ public bool ContainsKey(string key)
+ {
+ return this.TryCatch(() => this.client.ContainsKey(key), key);
+ }
+
+ public long DecrementValue(string key)
+ {
+ return this.TryCatch(() => this.client.DecrementValue(key), key);
+ }
+
+ public long DecrementValueBy(string key, int count)
+ {
+ return this.TryCatch(() => this.client.DecrementValueBy(key, count), key);
+ }
+
+ public string DequeueItemFromList(string listId)
+ {
+ return this.TryCatch(() => this.client.DequeueItemFromList(listId), listId);
+ }
+
+ public void EnqueueItemOnList(string listId, string value)
+ {
+ this.TryCatch(delegate
+ {
+ this.client.EnqueueItemOnList(listId, value);
+ }, listId);
+ }
+
+ public bool ExpireEntryAt(string key, DateTime expireAt)
+ {
+ return this.TryCatch(() => this.client.ExpireEntryAt(key, expireAt), key);
+ }
+
+ public bool ExpireEntryIn(string key, TimeSpan expireIn)
+ {
+ return this.TryCatch(() => this.client.ExpireEntryIn(key, expireIn), key);
+ }
+
+ public Dictionary GetAllEntriesFromHash(string hashId)
+ {
+ return this.TryCatch>(() => this.client.GetAllEntriesFromHash(hashId), hashId);
+ }
+
+ public List GetAllItemsFromList(string listId)
+ {
+ return this.TryCatch>(() => this.client.GetAllItemsFromList(listId), listId);
+ }
+
+ public HashSet GetAllItemsFromSet(string setId)
+ {
+ return this.TryCatch>(() => this.client.GetAllItemsFromSet(setId), setId);
+ }
+
+ public List GetAllItemsFromSortedSet(string setId)
+ {
+ return this.TryCatch>(() => this.client.GetAllItemsFromSortedSet(setId), setId);
+ }
+
+ public List GetAllItemsFromSortedSetDesc(string setId)
+ {
+ return this.TryCatch>(() => this.client.GetAllItemsFromSortedSetDesc(setId), setId);
+ }
+
+ public List GetAllKeys()
+ {
+ return this.TryCatch>(() => this.client.GetAllKeys(), string.Empty);
+ }
+
+ public IDictionary GetAllWithScoresFromSortedSet(string setId)
+ {
+ return this.TryCatch>(() => this.client.GetAllWithScoresFromSortedSet(setId), setId);
+ }
+
+ public string GetAndSetEntry(string key, string value)
+ {
+ return this.TryCatch(() => this.client.GetAndSetValue(key, value), key);
+ }
+
+ public HashSet GetDifferencesFromSet(string fromSetId, params string[] withSetIds)
+ {
+ return this.TryCatch>(() => this.client.GetDifferencesFromSet(fromSetId, withSetIds), fromSetId);
+ }
+
+ public T GetFromHash(object id)
+ {
+ return this.TryCatch(() => this.client.GetFromHash(id), string.Empty);
+ }
+
+ public long GetHashCount(string hashId)
+ {
+ return this.TryCatch(() => this.client.GetHashCount(hashId), hashId);
+ }
+
+ public List GetHashKeys(string hashId)
+ {
+ return this.TryCatch>(() => this.client.GetHashKeys(hashId), hashId);
+ }
+
+ public List GetHashValues(string hashId)
+ {
+ return this.TryCatch>(() => this.client.GetHashValues(hashId), hashId);
+ }
+
+ public HashSet GetIntersectFromSets(params string[] setIds)
+ {
+ return this.TryCatch>(() => this.client.GetIntersectFromSets(setIds), setIds[0]);
+ }
+
+ public string GetItemFromList(string listId, int listIndex)
+ {
+ return this.TryCatch(() => this.client.GetItemFromList(listId, listIndex), listId);
+ }
+
+ public long GetItemIndexInSortedSet(string setId, string value)
+ {
+ return this.TryCatch(() => this.client.GetItemIndexInSortedSet(setId, value), setId);
+ }
+
+ public long GetItemIndexInSortedSetDesc(string setId, string value)
+ {
+ return this.TryCatch(() => this.client.GetItemIndexInSortedSetDesc(setId, value), setId);
+ }
+
+ public double GetItemScoreInSortedSet(string setId, string value)
+ {
+ return this.TryCatch(() => this.client.GetItemScoreInSortedSet(setId, value), setId);
+ }
+
+ public long GetListCount(string listId)
+ {
+ return this.TryCatch(() => this.client.GetListCount(listId), listId);
+ }
+
+ public string GetRandomItemFromSet(string setId)
+ {
+ return this.TryCatch(() => this.client.GetRandomItemFromSet(setId), setId);
+ }
+
+ public List GetRangeFromList(string listId, int startingFrom, int endingAt)
+ {
+ return this.TryCatch>(() => this.client.GetRangeFromList(listId, startingFrom, endingAt), listId);
+ }
+
+ public List GetRangeFromSortedList(string listId, int startingFrom, int endingAt)
+ {
+ return this.TryCatch>(() => this.client.GetRangeFromSortedList(listId, startingFrom, endingAt), listId);
+ }
+
+ public List GetRangeFromSortedSet(string setId, int fromRank, int toRank)
+ {
+ return this.TryCatch>(() => this.client.GetRangeFromSortedSet(setId, fromRank, toRank), setId);
+ }
+
+ public List GetRangeFromSortedSetByHighestScore(string setId, double fromScore, double toScore)
+ {
+ return this.TryCatch>(() => this.client.GetRangeFromSortedSetByHighestScore(setId, fromScore, toScore), setId);
+ }
+
+ public List GetRangeFromSortedSetByHighestScore(string setId, long fromScore, long toScore)
+ {
+ return this.TryCatch>(() => this.client.GetRangeFromSortedSetByHighestScore(setId, fromScore, toScore), setId);
+ }
+
+ public List GetRangeFromSortedSetByHighestScore(string setId, string fromStringScore, string toStringScore)
+ {
+ return this.TryCatch>(() => this.client.GetRangeFromSortedSetByHighestScore(setId, fromStringScore, toStringScore), setId);
+ }
+
+ public List GetRangeFromSortedSetByHighestScore(string setId, double fromScore, double toScore, int? skip, int? take)
+ {
+ return this.TryCatch>(() => this.client.GetRangeFromSortedSetByHighestScore(setId, fromScore, toScore, skip, take), setId);
+ }
+
+ public List GetRangeFromSortedSetByHighestScore(string setId, long fromScore, long toScore, int? skip, int? take)
+ {
+ return this.TryCatch>(() => this.client.GetRangeFromSortedSetByHighestScore(setId, fromScore, toScore, skip, take), setId);
+ }
+
+ public List GetRangeFromSortedSetByHighestScore(string setId, string fromStringScore, string toStringScore, int? skip, int? take)
+ {
+ return this.TryCatch>(() => this.client.GetRangeFromSortedSetByHighestScore(setId, fromStringScore, toStringScore, skip, take), setId);
+ }
+
+ public List GetRangeFromSortedSetByLowestScore(string setId, double fromScore, double toScore)
+ {
+ return this.TryCatch>(() => this.client.GetRangeFromSortedSetByLowestScore(setId, fromScore, toScore), setId);
+ }
+
+ public List GetRangeFromSortedSetByLowestScore(string setId, long fromScore, long toScore)
+ {
+ return this.TryCatch>(() => this.client.GetRangeFromSortedSetByLowestScore(setId, fromScore, toScore), setId);
+ }
+
+ public List GetRangeFromSortedSetByLowestScore(string setId, string fromStringScore, string toStringScore)
+ {
+ return this.TryCatch>(() => this.client.GetRangeFromSortedSetByLowestScore(setId, fromStringScore, toStringScore), setId);
+ }
+
+ public List GetRangeFromSortedSetByLowestScore(string setId, double fromScore, double toScore, int? skip, int? take)
+ {
+ return this.TryCatch>(() => this.client.GetRangeFromSortedSetByLowestScore(setId, fromScore, toScore, skip, take), setId);
+ }
+
+ public List GetRangeFromSortedSetByLowestScore(string setId, long fromScore, long toScore, int? skip, int? take)
+ {
+ return this.TryCatch>(() => this.client.GetRangeFromSortedSetByLowestScore(setId, fromScore, toScore, skip, take), setId);
+ }
+
+ public List GetRangeFromSortedSetByLowestScore(string setId, string fromStringScore, string toStringScore, int? skip, int? take)
+ {
+ return this.TryCatch>(() => this.client.GetRangeFromSortedSetByLowestScore(setId, fromStringScore, toStringScore, skip, take), setId);
+ }
+
+ public List GetRangeFromSortedSetDesc(string setId, int fromRank, int toRank)
+ {
+ return this.TryCatch>(() => this.client.GetRangeFromSortedSetDesc(setId, fromRank, toRank), setId);
+ }
+
+ public IDictionary GetRangeWithScoresFromSortedSet(string setId, int fromRank, int toRank)
+ {
+ return this.TryCatch>(() => this.client.GetRangeWithScoresFromSortedSet(setId, fromRank, toRank), setId);
+ }
+
+ public IDictionary GetRangeWithScoresFromSortedSetByHighestScore(string setId, double fromScore, double toScore)
+ {
+ return this.TryCatch>(() => this.client.GetRangeWithScoresFromSortedSetByHighestScore(setId, fromScore, toScore), setId);
+ }
+
+ public IDictionary GetRangeWithScoresFromSortedSetByHighestScore(string setId, long fromScore, long toScore)
+ {
+ return this.TryCatch>(() => this.client.GetRangeWithScoresFromSortedSetByHighestScore(setId, fromScore, toScore), setId);
+ }
+
+ public IDictionary GetRangeWithScoresFromSortedSetByHighestScore(string setId, string fromStringScore, string toStringScore)
+ {
+ return this.TryCatch>(() => this.client.GetRangeWithScoresFromSortedSetByHighestScore(setId, fromStringScore, toStringScore), setId);
+ }
+
+ public IDictionary GetRangeWithScoresFromSortedSetByHighestScore(string setId, double fromScore, double toScore, int? skip, int? take)
+ {
+ return this.TryCatch>(() => this.client.GetRangeWithScoresFromSortedSetByHighestScore(setId, fromScore, toScore, skip, take), setId);
+ }
+
+ public IDictionary GetRangeWithScoresFromSortedSetByHighestScore(string setId, long fromScore, long toScore, int? skip, int? take)
+ {
+ return this.TryCatch>(() => this.client.GetRangeWithScoresFromSortedSetByHighestScore(setId, fromScore, toScore, skip, take), setId);
+ }
+
+ public IDictionary GetRangeWithScoresFromSortedSetByHighestScore(string setId, string fromStringScore, string toStringScore, int? skip, int? take)
+ {
+ return this.TryCatch>(() => this.client.GetRangeWithScoresFromSortedSetByHighestScore(setId, fromStringScore, toStringScore, skip, take), setId);
+ }
+
+ public IDictionary GetRangeWithScoresFromSortedSetByLowestScore(string setId, double fromScore, double toScore)
+ {
+ return this.TryCatch>(() => this.client.GetRangeWithScoresFromSortedSetByHighestScore(setId, fromScore, toScore), setId);
+ }
+
+ public IDictionary GetRangeWithScoresFromSortedSetByLowestScore(string setId, long fromScore, long toScore)
+ {
+ return this.TryCatch>(() => this.client.GetRangeWithScoresFromSortedSetByLowestScore(setId, fromScore, toScore), setId);
+ }
+
+ public IDictionary GetRangeWithScoresFromSortedSetByLowestScore(string setId, string fromStringScore, string toStringScore)
+ {
+ return this.TryCatch>(() => this.client.GetRangeWithScoresFromSortedSetByLowestScore(setId, fromStringScore, toStringScore), setId);
+ }
+
+ public IDictionary GetRangeWithScoresFromSortedSetByLowestScore(string setId, double fromScore, double toScore, int? skip, int? take)
+ {
+ return this.TryCatch>(() => this.client.GetRangeWithScoresFromSortedSetByLowestScore(setId, fromScore, toScore, skip, take), setId);
+ }
+
+ public IDictionary GetRangeWithScoresFromSortedSetByLowestScore(string setId, long fromScore, long toScore, int? skip, int? take)
+ {
+ return this.TryCatch>(() => this.client.GetRangeWithScoresFromSortedSetByLowestScore(setId, fromScore, toScore, skip, take), setId);
+ }
+
+ public IDictionary GetRangeWithScoresFromSortedSetByLowestScore(string setId, string fromStringScore, string toStringScore, int? skip, int? take)
+ {
+ return this.TryCatch>(() => this.client.GetRangeWithScoresFromSortedSetByLowestScore(setId, fromStringScore, toStringScore, skip, take), setId);
+ }
+
+ public IDictionary GetRangeWithScoresFromSortedSetDesc(string setId, int fromRank, int toRank)
+ {
+ return this.TryCatch>(() => this.client.GetRangeWithScoresFromSortedSetDesc(setId, fromRank, toRank), setId);
+ }
+
+ public long GetSetCount(string setId)
+ {
+ return this.TryCatch(() => this.client.GetSetCount(setId), setId);
+ }
+
+ public List GetSortedEntryValues(string key, int startingFrom, int endingAt)
+ {
+ return this.TryCatch>(() => this.client.GetSortedEntryValues(key, startingFrom, endingAt), key);
+ }
+
+ public long GetSortedSetCount(string setId)
+ {
+ return this.TryCatch(() => this.client.GetSortedSetCount(setId), setId);
+ }
+
+ public long GetSortedSetCount(string setId, double fromScore, double toScore)
+ {
+ return this.TryCatch(() => this.client.GetSortedSetCount(setId, fromScore, toScore), setId);
+ }
+
+ public long GetSortedSetCount(string setId, long fromScore, long toScore)
+ {
+ return this.TryCatch(() => this.client.GetSortedSetCount(setId, fromScore, toScore), setId);
+ }
+
+ public long GetSortedSetCount(string setId, string fromStringScore, string toStringScore)
+ {
+ return this.TryCatch(() => this.client.GetSortedSetCount(setId, fromStringScore, toStringScore), setId);
+ }
+
+ public string GetSubstring(string key, int fromIndex, int toIndex)
+ {
+ return this.TryCatch(delegate
+ {
+ byte[] bytes = ((RedisClient)this.client).GetRange(key, fromIndex, toIndex);
+ if (bytes != null)
+ {
+ return StringExtensions.FromUtf8Bytes(bytes);
+ }
+ return null;
+ }, key);
+ }
+
+ public TimeSpan GetTimeToLive(string key)
+ {
+ return this.TryCatch(delegate
+ {
+ TimeSpan? t = this.client.GetTimeToLive(key);
+ if (!t.HasValue)
+ {
+ return TimeSpan.Zero;
+ }
+ return t.Value;
+ }, key);
+ }
+
+ public HashSet GetUnionFromSets(params string[] setIds)
+ {
+ return this.TryCatch>(() => this.client.GetUnionFromSets(setIds), setIds[0]);
+ }
+
+ public string GetValue(string key)
+ {
+ return this.TryCatch(() => this.client.GetValue(key), key);
+ }
+
+ public string GetValueFromHash(string hashId, string key)
+ {
+ return this.TryCatch(() => this.client.GetValueFromHash(hashId, key), hashId);
+ }
+
+ public List GetValues(List keys)
+ {
+ return this.TryCatch>(() => this.client.GetValues(keys), keys[0]);
+ }
+
+ public List GetValues(List keys)
+ {
+ return this.TryCatch>(() => this.client.GetValues(keys), keys[0]);
+ }
+
+ public List GetValuesFromHash(string hashId, params string[] keys)
+ {
+ return this.TryCatch>(() => this.client.GetValuesFromHash(hashId, keys), hashId);
+ }
+
+ public Dictionary GetValuesMap(List keys)
+ {
+ return this.TryCatch>(() => this.client.GetValuesMap(keys), keys[0]);
+ }
+
+ public Dictionary GetValuesMap(List keys)
+ {
+ return this.TryCatch>(() => this.client.GetValuesMap(keys), keys[0]);
+ }
+
+ public bool HashContainsEntry(string hashId, string key)
+ {
+ return this.TryCatch(() => this.client.HashContainsEntry(hashId, key), hashId);
+ }
+
+ public double IncrementItemInSortedSet(string setId, string value, double incrementBy)
+ {
+ return this.TryCatch(() => this.client.IncrementItemInSortedSet(setId, value, incrementBy), setId);
+ }
+
+ public double IncrementItemInSortedSet(string setId, string value, long incrementBy)
+ {
+ return this.TryCatch(() => this.client.IncrementItemInSortedSet(setId, value, incrementBy), setId);
+ }
+
+ public long IncrementValue(string key)
+ {
+ return this.TryCatch(() => this.client.IncrementValue(key), key);
+ }
+
+ public long IncrementValueBy(string key, int count)
+ {
+ return this.TryCatch(() => this.client.IncrementValueBy(key, count), key);
+ }
+
+ public long IncrementValueInHash(string hashId, string key, int incrementBy)
+ {
+ return this.TryCatch(() => this.client.IncrementValueInHash(hashId, key, incrementBy), hashId);
+ }
+
+ public void MoveBetweenSets(string fromSetId, string toSetId, string item)
+ {
+ this.TryCatch(delegate
+ {
+ this.client.MoveBetweenSets(fromSetId, toSetId, item);
+ }, fromSetId);
+ }
+
+ public string PopAndPushItemBetweenLists(string fromListId, string toListId)
+ {
+ return this.TryCatch(() => this.client.PopAndPushItemBetweenLists(fromListId, toListId), fromListId);
+ }
+
+ public string PopItemFromList(string listId)
+ {
+ return this.TryCatch(() => this.client.PopItemFromList(listId), listId);
+ }
+
+ public string PopItemFromSet(string setId)
+ {
+ return this.TryCatch(() => this.client.PopItemFromSet(setId), setId);
+ }
+
+ public string PopItemWithHighestScoreFromSortedSet(string setId)
+ {
+ return this.TryCatch(() => this.client.PopItemWithHighestScoreFromSortedSet(setId), setId);
+ }
+
+ public string PopItemWithLowestScoreFromSortedSet(string setId)
+ {
+ return this.TryCatch(() => this.client.PopItemWithLowestScoreFromSortedSet(setId), setId);
+ }
+
+ public void PrependItemToList(string listId, string value)
+ {
+ this.TryCatch(delegate
+ {
+ this.client.PrependItemToList(listId, value);
+ }, listId);
+ }
+
+ public void PrependRangeToList(string listId, List values)
+ {
+ this.TryCatch(delegate
+ {
+ this.client.PrependRangeToList(listId, values);
+ }, listId);
+ }
+
+ public long PublishMessage(string toChannel, string message)
+ {
+ return this.TryCatch(() => this.client.PublishMessage(toChannel, message), string.Empty);
+ }
+
+ public void PushItemToList(string listId, string value)
+ {
+ this.TryCatch(delegate
+ {
+ this.client.PushItemToList(listId, value);
+ }, listId);
+ }
+
+ public void RemoveAllFromList(string listId)
+ {
+ this.TryCatch(delegate
+ {
+ this.client.Remove(listId);
+ }, listId);
+ }
+
+ public string RemoveEndFromList(string listId)
+ {
+ return this.TryCatch(() => this.client.RemoveEndFromList(listId), listId);
+ }
+
+ public bool RemoveEntry(params string[] args)
+ {
+ return this.TryCatch(() => this.client.RemoveEntry(args), args[0]);
+ }
+
+ public bool RemoveEntryFromHash(string hashId, string key)
+ {
+ return this.TryCatch(() => this.client.RemoveEntryFromHash(hashId, key), hashId);
+ }
+
+ public long RemoveItemFromList(string listId, string value)
+ {
+ return this.TryCatch(() => this.client.RemoveItemFromList(listId, value), listId);
+ }
+
+ public long RemoveItemFromList(string listId, string value, int noOfMatches)
+ {
+ return this.TryCatch(() => this.client.RemoveItemFromList(listId, value, noOfMatches), listId);
+ }
+
+ public void RemoveItemFromSet(string setId, string item)
+ {
+ this.TryCatch(delegate
+ {
+ this.client.RemoveItemFromSet(setId, item);
+ }, setId);
+ }
+
+ public bool RemoveItemFromSortedSet(string setId, string value)
+ {
+ return this.TryCatch(() => this.client.RemoveItemFromSortedSet(setId, value), setId);
+ }
+ ///
+ /// 骚操作-- redis 连接池-- 如果出现高并发,客户端的连接数量会上限,为了节省资源,重复利用连接对象,通过线程池去获取连接
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static IRedisClientsManager GetPoolClient(string host, int port, int db)
+ {
+ return new PooledRedisClientManager(db, host + ":" + port);
+ }
+ public long RemoveRangeFromSortedSet(string setId, int minRank, int maxRank)
+ {
+ return this.TryCatch(() => this.client.RemoveRangeFromSortedSet(setId, minRank, maxRank), setId);
+ }
+
+ public long RemoveRangeFromSortedSetByScore(string setId, double fromScore, double toScore)
+ {
+ return this.TryCatch(() => this.client.RemoveRangeFromSortedSetByScore(setId, fromScore, toScore), setId);
+ }
+
+ public long RemoveRangeFromSortedSetByScore(string setId, long fromScore, long toScore)
+ {
+ return this.TryCatch(() => this.client.RemoveRangeFromSortedSetByScore(setId, fromScore, toScore), setId);
+ }
+
+ public string RemoveStartFromList(string listId)
+ {
+ return this.TryCatch(() => this.client.RemoveStartFromList(listId), listId);
+ }
+
+ public void RenameKey(string fromName, string toName)
+ {
+ this.TryCatch(delegate
+ {
+ this.client.RenameKey(fromName, toName);
+ }, string.Empty);
+ }
+
+ public List