/* * 由SharpDevelop创建。 * 用户: Administrator * 日期: 2018-12-07 * 时间: 15:34 * * 要改变这种模板请点击 工具|选项|代码编写|编辑标准头文件 */ using System; using System.Collections; using System.Collections.Generic; using System.IO; using System.Net; using System.Reflection; using System.Text; using System.Threading; using System.Threading.Tasks; using MrWu.Debug; using StackExchange.Redis; namespace Server.DB.Redis { /* * CommandFlags * None = 0; //默认行为 * HighPriority = 1; //不用了,废弃 * FireAndForget = 2; //对结果不感兴趣,调用者将会立即收到默认值 * PreferMaster = 0; //如果主服务器可用,则应在主服务器上执行此操作,但可以执行读操作 * DemandMaster = 4; //此操作只应在[主站]上执行 * PreferSlave = 8; //如果可用,则应在[从站]上执行此操作,但将在其上执行 * DemandSlave = 12; //此操作只应在[从站]上执行。 仅适用于读取操作。 * NoRedirect = 64; //表示由于ASK或MOVED响应,不应将此操作转发到其他服务器 * NoScriptCache = 512 //表示与脚本相关的操作应使用EVAL,而不是SCRIPT LOAD + EVALSHA * */ /* * When * Always: 一直 * Exists: 当key存在时才生效 * NotExists: 当key不存在时才生效 * * */ /// /// IDatabase 代理 /// public partial class IDatabaseProxy { private IDatabase db; /// /// /// /// public IDatabaseProxy(IDatabase db) { this.db = db; } /// /// 循环超时数量 /// private const int loopOutCnt = 3; private T FDBOpera(Func func, K1 param1) { int cnt = 0; while(true) { try { return func(param1); } catch(TimeoutException) { cnt++; if(cnt > loopOutCnt) { Debug.Fatal("Redis 命令超时重试次数已达上限!"); throw; } } catch(Exception e) { Debug.Fatal("redis错误:" + e); throw; } } } private T FDBOpera(Func func, K1 param1, K2 param2) { int cnt = 0; while(true) { try { return func(param1, param2); } catch(TimeoutException) { cnt++; if(cnt > loopOutCnt) { Debug.Fatal("Redis 命令超时重试次数已达上限!"); throw; } } catch(Exception e) { Debug.Fatal("redis错误:" + e); throw; } } } private T FDBOpera(Func func, K1 param1, K2 param2, K3 param3) { int cnt = 0; while(true) { try { return func(param1, param2, param3); } catch(TimeoutException) { cnt++; if(cnt > loopOutCnt) { Debug.Fatal("Redis 命令超时重试次数已达上限!"); throw; } } catch(Exception e) { Debug.Fatal("redis错误:" + e); throw; } } } private T FDBOpera(Func func, K1 param1, K2 param2, K3 param3, K4 param4) { int cnt = 0; while(true) { try { return func(param1, param2, param3, param4); } catch(TimeoutException) { cnt++; if(cnt > loopOutCnt) { Debug.Fatal("Redis 命令超时重试次数已达上限!"); throw; } } catch(Exception e) { Debug.Fatal("redis错误:" + e); throw; } } } private T FDBOpera(Func func, K1 param1, K2 param2, K3 param3, K4 param4, K5 param5) { int cnt = 0; while(true) { try { return func(param1, param2, param3, param4, param5); } catch(TimeoutException) { cnt++; if(cnt > loopOutCnt) { Debug.Fatal("Redis 命令超时重试次数已达上限!"); throw; } } catch(Exception e) { Debug.Fatal("redis错误:" + e); throw; } } } private T FDBOpera(Func func, K1 param1, K2 param2, K3 param3, K4 param4, K5 param5, K6 param6) { int cnt = 0; while(true) { try { return func(param1, param2, param3, param4, param5, param6); } catch(TimeoutException) { cnt++; if(cnt > loopOutCnt) { Debug.Fatal("Redis 命令超时重试次数已达上限!"); throw; } } catch(Exception e) { Debug.Fatal("redis错误:" + e); throw; } } } private T FDBOpera(Func func, K1 param1, K2 param2, K3 param3, K4 param4, K5 param5, K6 param6, K7 param7) { int cnt = 0; while(true) { try { return func(param1, param2, param3, param4, param5, param6, param7); } catch(TimeoutException) { cnt++; if(cnt > loopOutCnt) { Debug.Fatal("Redis 命令超时重试次数已达上限!"); throw; } } catch(Exception e) { Debug.Fatal("redis错误:" + e); throw; } } } private T FDBOpera(Func func, K1 param1, K2 param2, K3 param3, K4 param4, K5 param5, K6 param6, K7 param7, K8 param8) { int cnt = 0; while(true) { try { return func(param1, param2, param3, param4, param5, param6, param7, param8); } catch(TimeoutException) { cnt++; if(cnt > loopOutCnt) { Debug.Fatal("Redis 命令超时重试次数已达上限!"); throw; } } catch(Exception e) { Debug.Fatal("redis错误:" + e); throw; } } } private T FDBOpera(Func func, K1 param1, K2 param2, K3 param3, K4 param4, K5 param5, K6 param6, K7 param7, K8 param8, K9 param9) { int cnt = 0; while(true) { try { return func(param1, param2, param3, param4, param5, param6, param7, param8, param9); } catch(TimeoutException) { cnt++; if(cnt > loopOutCnt) { Debug.Fatal("Redis 命令超时重试次数已达上限!"); throw; } } catch(Exception e) { Debug.Fatal("redis错误:" + e); throw; } } } private void ADBOpera(Action action, K1 param1, K2 param2, K3 param3) { int cnt = 0; while(true) { try { action(param1, param2, param3); return; } catch(TimeoutException) { cnt++; if(cnt > loopOutCnt) { Debug.Fatal("Redis 命令超时重试次数已达上限!"); throw; } } catch(Exception e) { Debug.Fatal("redis错误:" + e); throw; } } } #region 异步重试方法 private async Task FDBOperaAsync(Func> func, K1 param1) { int cnt = 0; while(true) { try { return await func(param1); } catch(TimeoutException) { cnt++; if(cnt > loopOutCnt) { Debug.Fatal("Redis 命令超时重试次数已达上限!"); throw; } } catch(Exception e) { Debug.Fatal("redis错误:" + e); throw; } } } private async Task FDBOperaAsync(Func> func, K1 param1, K2 param2) { int cnt = 0; while(true) { try { return await func(param1, param2); } catch(TimeoutException) { cnt++; if(cnt > loopOutCnt) { Debug.Fatal("Redis 命令超时重试次数已达上限!"); throw; } } catch(Exception e) { Debug.Fatal("redis错误:" + e); throw; } } } private async Task FDBOperaAsync(Func> func, K1 param1, K2 param2, K3 param3) { int cnt = 0; while(true) { try { return await func(param1, param2, param3); } catch(TimeoutException) { cnt++; if(cnt > loopOutCnt) { Debug.Fatal("Redis 命令超时重试次数已达上限!"); throw; } } catch(Exception e) { Debug.Fatal("redis错误:" + e); throw; } } } private async Task FDBOperaAsync(Func> func, K1 param1, K2 param2, K3 param3, K4 param4) { int cnt = 0; while(true) { try { return await func(param1, param2, param3, param4); } catch(TimeoutException) { cnt++; if(cnt > loopOutCnt) { Debug.Fatal("Redis 命令超时重试次数已达上限!"); throw; } } catch(Exception e) { Debug.Fatal("redis错误:" + e); throw; } } } private async Task FDBOperaAsync(Func> func, K1 param1, K2 param2, K3 param3, K4 param4, K5 param5) { int cnt = 0; while(true) { try { return await func(param1, param2, param3, param4, param5); } catch(TimeoutException) { cnt++; if(cnt > loopOutCnt) { Debug.Fatal("Redis 命令超时重试次数已达上限!"); throw; } } catch(Exception e) { Debug.Fatal("redis错误:" + e); throw; } } } private async Task FDBOperaAsync(Func> func, K1 param1, K2 param2, K3 param3, K4 param4, K5 param5, K6 param6) { int cnt = 0; while(true) { try { return await func(param1, param2, param3, param4, param5, param6); } catch(TimeoutException) { cnt++; if(cnt > loopOutCnt) { Debug.Fatal("Redis 命令超时重试次数已达上限!"); throw; } } catch(Exception e) { Debug.Fatal("redis错误:" + e); throw; } } } private async Task FDBOperaAsync(Func> func, K1 param1, K2 param2, K3 param3, K4 param4, K5 param5, K6 param6, K7 param7) { int cnt = 0; while(true) { try { return await func(param1, param2, param3, param4, param5, param6, param7); } catch(TimeoutException) { cnt++; if(cnt > loopOutCnt) { Debug.Fatal("Redis 命令超时重试次数已达上限!"); throw; } } catch(Exception e) { Debug.Fatal("redis错误:" + e); throw; } } } private async Task FDBOperaAsync(Func> func, K1 param1, K2 param2, K3 param3, K4 param4, K5 param5, K6 param6, K7 param7, K8 param8) { int cnt = 0; while(true) { try { return await func(param1, param2, param3, param4, param5, param6, param7, param8); } catch(TimeoutException) { cnt++; if(cnt > loopOutCnt) { Debug.Fatal("Redis 命令超时重试次数已达上限!"); throw; } } catch(Exception e) { Debug.Fatal("redis错误:" + e); throw; } } } private async Task FDBOperaAsync(Func> func, K1 param1, K2 param2, K3 param3, K4 param4, K5 param5, K6 param6, K7 param7, K8 param8, K9 param9) { int cnt = 0; while(true) { try { return await func(param1, param2, param3, param4, param5, param6, param7, param8, param9); } catch(TimeoutException) { cnt++; if(cnt > loopOutCnt) { Debug.Fatal("Redis 命令超时重试次数已达上限!"); throw; } } catch(Exception e) { Debug.Fatal("redis错误:" + e); throw; } } } private async Task ADBOperaAsync(Func func, K1 param1, K2 param2, K3 param3) { int cnt = 0; while(true) { try { await func(param1, param2, param3); return; } catch(TimeoutException) { cnt++; if(cnt > loopOutCnt) { Debug.Fatal("Redis 命令超时重试次数已达上限!"); throw; } } catch(Exception e) { Debug.Fatal("redis错误:" + e); throw; } } } private async Task ADBOperaAsync(Func func, K1 param1, K2 param2, K3 param3, K4 param4) { int cnt = 0; while(true) { try { await func(param1, param2, param3, param4); return; } catch(TimeoutException) { cnt++; if(cnt > loopOutCnt) { Debug.Fatal("Redis 命令超时重试次数已达上限!"); throw; } } catch(Exception e) { Debug.Fatal("redis错误:" + e); throw; } } } private async Task ADBOperaAsync(Func func, K1 param1, K2 param2, K3 param3, K4 param4, K5 param5, K6 param6) { int cnt = 0; while(true) { try { await func(param1, param2, param3, param4, param5, param6); return; } catch(TimeoutException) { cnt++; if(cnt > loopOutCnt) { Debug.Fatal("Redis 命令超时重试次数已达上限!"); throw; } } catch(Exception e) { Debug.Fatal("redis错误:" + e); throw; } } } #endregion private void ADBOpera(Action action, K1 param1, K2 param2, K3 param3, K4 param4) { int cnt = 0; while(true) { try { action(param1, param2, param3, param4); return; } catch(TimeoutException) { cnt++; if(cnt > loopOutCnt) { Debug.Fatal("Redis 命令超时重试次数已达上限!"); throw; } } catch(Exception e) { Debug.Fatal("redis错误:" + e); throw; } } } private void ADBOpera(Action action, K1 params1, K2 params2, K3 params3, K4 params4, K5 params5, K6 params6) { int cnt = 0; while(true) { try { action(params1, params2, params3, params4, params5, params6); return; } catch(TimeoutException) { cnt++; if(cnt > loopOutCnt) { Debug.Fatal("Redis 命令超时重试次数已达上限!"); throw; } } catch(Exception e) { Debug.Fatal("redis错误:" + e); throw; } } } /// /// /// /// /// public IBatch CreateBatch(object asyncState = null) { return FDBOpera(db.CreateBatch, asyncState); } /// /// /// /// /// /// /// /// /// public void KeyMigrate(RedisKey key, EndPoint toServer, int toDatabase = 0, int timeoutMilliseconds = 0, MigrateOptions migrateOptions = MigrateOptions.None, CommandFlags flags = CommandFlags.None) { ADBOpera(db.KeyMigrate, key, toServer, toDatabase, timeoutMilliseconds, migrateOptions, flags); } /// /// /// /// /// /// public RedisValue DebugObject(RedisKey key, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.DebugObject, key, flags); } /// /// /// /// /// /// /// /// /// public bool GeoAdd(RedisKey key, double longitude, double latitude, RedisValue member, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.GeoAdd, key, longitude, latitude, member, flags); } /// /// /// /// /// /// /// public bool GeoAdd(RedisKey key, GeoEntry value, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.GeoAdd, key, value, flags); } /// /// /// /// /// /// /// public long GeoAdd(RedisKey key, GeoEntry[] values, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.GeoAdd, key, values, flags); } /// /// /// /// /// /// /// public bool GeoRemove(RedisKey key, RedisValue member, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.GeoRemove, key, member, flags); } /// /// /// /// /// /// /// /// /// public double? GeoDistance(RedisKey key, RedisValue member1, RedisValue member2, GeoUnit unit = GeoUnit.Meters, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.GeoDistance, key, member1, member2, unit, flags); } /// /// /// /// /// /// /// public string[] GeoHash(RedisKey key, RedisValue[] members, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.GeoHash, key, members, flags); } /// /// /// /// /// /// /// public string GeoHash(RedisKey key, RedisValue member, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.GeoHash, key, member, flags); } /// /// /// /// /// /// /// public GeoPosition?[] GeoPosition(RedisKey key, RedisValue[] members, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.GeoPosition, key, members, flags); } /// /// /// /// /// /// /// public GeoPosition? GeoPosition(RedisKey key, RedisValue member, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.GeoPosition, key, member, flags); } /// /// /// /// /// /// /// /// /// /// /// /// public GeoRadiusResult[] GeoRadius(RedisKey key, RedisValue member, double radius, GeoUnit unit = GeoUnit.Meters, int count = -1, Order? order = null, GeoRadiusOptions options = GeoRadiusOptions.Default, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.GeoRadius, key, member, radius, unit, count, order, options, flags); } /// /// /// /// /// /// /// /// /// /// /// /// /// public GeoRadiusResult[] GeoRadius(RedisKey key, double longitude, double latitude, double radius, GeoUnit unit = GeoUnit.Meters, int count = -1, Order? order = null, GeoRadiusOptions options = GeoRadiusOptions.Default, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.GeoRadius, key, longitude, latitude, radius, unit, count, order, options, flags); } /// /// Hash中作减法运算 /// /// /// /// /// /// public long HashDecrement(RedisKey key, RedisValue hashField, long value = 1L, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.HashDecrement, key, hashField, value, flags); } /// /// Hash中作减法运算 /// /// /// /// /// /// public double HashDecrement(RedisKey key, RedisValue hashField, double value, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.HashDecrement, key, hashField, value, flags); } /// /// 删除一个Hash中的一个键 /// /// /// /// /// 是否删除成功 public bool HashDelete(RedisKey key, RedisValue hashField, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.HashDelete, key, hashField, flags); } /// /// 删除hash中的一些键 /// /// /// /// /// 删除的数量 public long HashDelete(RedisKey key, RedisValue[] hashFields, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.HashDelete, key, hashFields, flags); } /// /// 某个Hash的键存在不存在 /// /// /// /// /// public bool HashExists(RedisKey key, RedisValue hashField, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.HashExists, key, hashField, flags); } /// /// 获取某个Hash的值 /// /// /// /// /// public RedisValue HashGet(RedisKey key, RedisValue hashField, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.HashGet, key, hashField, flags); } /// /// 获取一堆Hash的值 /// /// /// /// /// public RedisValue[] HashGet(RedisKey key, RedisValue[] hashFields, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.HashGet, key, hashFields, flags); } /// /// 获取所有的Hash键值对 /// /// /// /// public HashEntry[] HashGetAll(RedisKey key, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.HashGetAll, key, flags); } /// /// Hash中的值做加法运算 /// /// /// /// /// /// 运算后的结果 public long HashIncrement(RedisKey key, RedisValue hashField, long value = 1L, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.HashIncrement, key, hashField, value, flags); } /// /// Hash中做加法运算 /// /// /// /// /// /// public double HashIncrement(RedisKey key, RedisValue hashField, double value, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.HashIncrement, key, hashField, value, flags); } /// /// hash的所有键 /// /// /// /// public RedisValue[] HashKeys(RedisKey key, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.HashKeys, key, flags); } /// /// Hash中的键的数量 /// /// /// /// public long HashLength(RedisKey key, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.HashLength, key, flags); } /// /// /// /// /// /// /// /// public IEnumerable HashScan(RedisKey key, RedisValue pattern, int pageSize, CommandFlags flags) { return FDBOpera(db.HashScan, key, pattern, pageSize, flags); } /// /// /// /// /// /// /// /// /// /// public IEnumerable HashScan(RedisKey key, RedisValue pattern = default(RedisValue), int pageSize = 10, long cursor = 0L, int pageOffset = 0, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.HashScan, key, pattern, pageSize, cursor, pageOffset, flags); } /// /// 设置一堆键值队. /// /// /// /// public void HashSet(RedisKey key, HashEntry[] hashFields, CommandFlags flags = CommandFlags.None) { ADBOpera(db.HashSet, key, hashFields, flags); } /// /// 设置Hash键值对 /// /// /// /// /// 只能使用Always以及 NoeExists 表示是是Hash的key,而非redis的key /// /// 是否设置成功 public bool HashSet(RedisKey key, RedisValue hashField, RedisValue value, When when = When.Always, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.HashSet, key, hashField, value, when, flags); } /// /// 获取hash的所有值 /// /// /// /// public RedisValue[] HashValues(RedisKey key, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.HashValues, key, flags); } /// /// /// /// /// /// /// public bool HyperLogLogAdd(RedisKey key, RedisValue value, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.HyperLogLogAdd, key, value, flags); } /// /// /// /// /// /// /// public bool HyperLogLogAdd(RedisKey key, RedisValue[] values, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.HyperLogLogAdd, key, values, flags); } /// /// /// /// /// /// public long HyperLogLogLength(RedisKey key, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.HyperLogLogLength, key, flags); } /// /// /// /// /// /// public long HyperLogLogLength(RedisKey[] keys, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.HyperLogLogLength, keys, flags); } /// /// /// /// /// /// /// public void HyperLogLogMerge(RedisKey destination, RedisKey first, RedisKey second, CommandFlags flags = CommandFlags.None) { ADBOpera(db.HyperLogLogMerge, destination, first, second, flags); } /// /// /// /// /// /// public void HyperLogLogMerge(RedisKey destination, RedisKey[] sourceKeys, CommandFlags flags = CommandFlags.None) { ADBOpera(db.HyperLogLogMerge, destination, sourceKeys, flags); } /// /// /// /// /// /// public EndPoint IdentifyEndpoint(RedisKey key = default(RedisKey), CommandFlags flags = CommandFlags.None) { return FDBOpera(db.IdentifyEndpoint, key, flags); } /// /// /// /// /// /// public bool KeyDelete(RedisKey key, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.KeyDelete, key, flags); } /// /// /// /// /// /// public long KeyDelete(RedisKey[] keys, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.KeyDelete, keys, flags); } /// /// /// /// /// /// public byte[] KeyDump(RedisKey key, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.KeyDump, key, flags); } /// /// /// /// /// /// public bool KeyExists(RedisKey key, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.KeyExists, key, flags); } /// /// /// /// /// /// /// public bool KeyExpire(RedisKey key, TimeSpan? expiry, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.KeyExpire, key, expiry, flags); } /// /// /// /// /// /// /// public bool KeyExpire(RedisKey key, DateTime? expiry, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.KeyExpire, key, expiry, flags); } /// /// /// /// /// /// /// public bool KeyMove(RedisKey key, int database, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.KeyMove, key, database, flags); } /// /// /// /// /// /// public bool KeyPersist(RedisKey key, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.KeyPersist, key, flags); } /// /// /// /// /// public RedisKey KeyRandom(CommandFlags flags = CommandFlags.None) { return FDBOpera(db.KeyRandom, flags); } /// /// /// /// /// /// /// /// public bool KeyRename(RedisKey key, RedisKey newKey, When when = When.Always, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.KeyRename, key, newKey, when, flags); } /// /// /// /// /// /// /// public void KeyRestore(RedisKey key, byte[] value, TimeSpan? expiry = null, CommandFlags flags = CommandFlags.None) { ADBOpera(db.KeyRestore, key, value, expiry, flags); } /// /// /// /// /// /// public TimeSpan? KeyTimeToLive(RedisKey key, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.KeyTimeToLive, key, flags); } /// /// /// /// /// /// public RedisType KeyType(RedisKey key, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.KeyType, key, flags); } /// /// 获取列表中某个位置的元素 /// /// /// /// /// public RedisValue ListGetByIndex(RedisKey key, long index, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.ListGetByIndex, key, index, flags); } /// /// 在pivot的后面插入一个元素 /// /// /// /// /// /// 插入成功返回列表总长度 插入失败返回-1 public long ListInsertAfter(RedisKey key, RedisValue pivot, RedisValue value, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.ListInsertAfter, key, pivot, value, flags); } /// /// 在pivot的前面插入一个元素 /// /// /// /// /// /// 插入成功返回列表总长度,插入失败返回-1 public long ListInsertBefore(RedisKey key, RedisValue pivot, RedisValue value, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.ListInsertBefore, key, pivot, value, flags); } /// /// 从列表的左侧取出一个值 /// /// /// /// public RedisValue ListLeftPop(RedisKey key, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.ListLeftPop, key, flags); } /// /// 从列表的左侧插入元素 /// /// /// /// /// /// public long ListLeftPush(RedisKey key, RedisValue value, When when = When.Always, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.ListLeftPush, key, value, when, flags); } /// /// 从列表的左侧插入一堆值 顺序按数组的顺序插入 /// /// /// /// /// 返回插入后的元素个数 public long ListLeftPush(RedisKey key, RedisValue[] values, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.ListLeftPush, key, values, flags); } /// /// /// /// /// /// public long ListLength(RedisKey key, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.ListLength, key, flags); } /// /// /// /// /// /// /// /// public RedisValue[] ListRange(RedisKey key, long start = 0L, long stop = -1L, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.ListRange, key, start, stop, flags); } /// /// 从列表中删除某个元素 /// /// /// /// 要删除的数量 /// /// 真正删除的数量 public long ListRemove(RedisKey key, RedisValue value, long count = 0L, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.ListRemove, key, value, count, flags); } /// /// 从列表的右侧取出一个值 /// /// /// /// public RedisValue ListRightPop(RedisKey key, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.ListRightPop, key, flags); } /// /// 从source中的右侧取出元素 并把 元素从左侧插入到 destination /// /// /// /// /// 取出的元素 public RedisValue ListRightPopLeftPush(RedisKey source, RedisKey destination, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.ListRightPopLeftPush, source, destination, flags); } /// /// 从列表的右侧插入元素 /// /// /// /// /// /// 插入后的元素个数 public long ListRightPush(RedisKey key, RedisValue value, When when = When.Always, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.ListRightPush, key, value, when, flags); } /// /// 从列表的右侧插入一堆元素 /// /// /// /// /// 插入后的元素个数 public long ListRightPush(RedisKey key, RedisValue[] values, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.ListRightPush, key, values, flags); } /// /// 设置列表中某个位置的元素 /// /// /// /// /// public void ListSetByIndex(RedisKey key, long index, RedisValue value, CommandFlags flags = CommandFlags.None) { ADBOpera(db.ListSetByIndex, key, index, value, flags); } /// /// 裁剪列表 /// /// /// /// /// public void ListTrim(RedisKey key, long start, long stop, CommandFlags flags = CommandFlags.None) { ADBOpera(db.ListTrim, key, start, stop, flags); } /// /// /// /// /// /// /// /// public bool LockExtend(RedisKey key, RedisValue value, TimeSpan expiry, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.LockExtend, key, value, expiry, flags); } /// /// /// /// /// /// public RedisValue LockQuery(RedisKey key, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.LockQuery, key, flags); } /// /// /// /// /// /// /// public bool LockRelease(RedisKey key, RedisValue value, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.LockRelease, key, value, flags); } /// /// /// /// /// /// /// /// public bool LockTake(RedisKey key, RedisValue value, TimeSpan expiry, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.LockTake, key, value, expiry, flags); } /// /// /// /// /// /// /// public long Publish(RedisChannel channel, RedisValue message, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.Publish, channel, message, flags); } /// /// /// /// /// /// /// /// public RedisResult ScriptEvaluate(string script, RedisKey[] keys = null, RedisValue[] values = null, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.ScriptEvaluate, script, keys, values, flags); } /// /// /// /// /// /// /// /// public RedisResult ScriptEvaluate(byte[] hash, RedisKey[] keys = null, RedisValue[] values = null, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.ScriptEvaluate, hash, keys, values, flags); } /// /// /// /// /// /// /// public RedisResult ScriptEvaluate(LuaScript script, object parameters = null, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.ScriptEvaluate, script, parameters, flags); } /// /// /// /// /// /// /// public RedisResult ScriptEvaluate(LoadedLuaScript script, object parameters = null, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.ScriptEvaluate, script, parameters, flags); } /// /// 集合添加 /// /// /// /// /// 是否添加成功 public bool SetAdd(RedisKey key, RedisValue value, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.SetAdd, key, value, flags); } /// /// 集合添加 /// /// /// /// /// public long SetAdd(RedisKey key, RedisValue[] values, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.SetAdd, key, values, flags); } /// /// 合并集合 /// /// /// /// /// /// public RedisValue[] SetCombine(SetOperation operation, RedisKey first, RedisKey second, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.SetCombine, operation, first, second, flags); } /// /// 合并集合 /// /// /// /// /// public RedisValue[] SetCombine(SetOperation operation, RedisKey[] keys, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.SetCombine, operation, keys, flags); } /// /// 合并集合并另存 /// /// /// /// /// /// /// public long SetCombineAndStore(SetOperation operation, RedisKey destination, RedisKey first, RedisKey second, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.SetCombineAndStore, operation, destination, first, second, flags); } /// /// 合并集合并另存 /// /// /// /// /// /// public long SetCombineAndStore(SetOperation operation, RedisKey destination, RedisKey[] keys, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.SetCombineAndStore, operation, destination, keys, flags); } /// /// 是否宝航 /// /// /// /// /// public bool SetContains(RedisKey key, RedisValue value, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.SetContains, key, value, flags); } /// /// 集合元素个数 /// /// /// /// public long SetLength(RedisKey key, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.SetLength, key, flags); } /// /// 获取集合所有成员 /// /// /// /// public RedisValue[] SetMembers(RedisKey key, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.SetMembers, key, flags); } /// /// 集合移动到另一个集合 /// /// /// /// /// /// public bool SetMove(RedisKey source, RedisKey destination, RedisValue value, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.SetMove, source, destination, value, flags); } /// /// 随机取出一个元素 /// /// /// /// public RedisValue SetPop(RedisKey key, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.SetPop, key, flags); } /// /// 随机返回一个元素 /// /// /// /// public RedisValue SetRandomMember(RedisKey key, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.SetRandomMember, key, flags); } /// /// 随机返回count个元素 /// /// /// /// /// public RedisValue[] SetRandomMembers(RedisKey key, long count, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.SetRandomMembers, key, count, flags); } /// /// 移除一个元素 /// /// /// /// /// public bool SetRemove(RedisKey key, RedisValue value, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.SetRemove, key, value, flags); } /// /// 移除一堆元素 /// /// /// /// /// public long SetRemove(RedisKey key, RedisValue[] values, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.SetRemove, key, values, flags); } /// /// 查找元素 /// /// /// /// /// /// public IEnumerable SetScan(RedisKey key, RedisValue pattern, int pageSize, CommandFlags flags) { return FDBOpera(db.SetScan, key, pattern, pageSize, flags); } /// /// 查找 /// /// /// /// /// /// /// /// public IEnumerable SetScan(RedisKey key, RedisValue pattern = default(RedisValue), int pageSize = 10, long cursor = 0L, int pageOffset = 0, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.SetScan, key, pattern, pageSize, cursor, pageOffset, flags); } /// /// /// /// /// /// /// /// /// /// /// /// public RedisValue[] Sort(RedisKey key, long skip = 0L, long take = -1L, Order order = Order.Ascending, SortType sortType = SortType.Numeric, RedisValue by = default(RedisValue), RedisValue[] get = null, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.Sort, key, skip, take, order, sortType, by, get, flags); } /// /// /// /// /// /// /// /// /// /// /// /// /// public long SortAndStore(RedisKey destination, RedisKey key, long skip = 0L, long take = -1L, Order order = Order.Ascending, SortType sortType = SortType.Numeric, RedisValue by = default(RedisValue), RedisValue[] get = null, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.SortAndStore, destination, key, skip, take, order, sortType, by, get, flags); } /// /// 添加一个元素到有序集合 如果存在则修改其对应的分值 /// /// /// /// /// /// 是否添加成功 public bool SortedSetAdd(RedisKey key, RedisValue member, double score, CommandFlags flags) { return FDBOpera(db.SortedSetAdd, key, member, score, flags); } /// /// /// /// /// /// /// /// /// public bool SortedSetAdd(RedisKey key, RedisValue member, double score, When when = When.Always, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.SortedSetAdd, key, member, score, when, flags); } /// /// /// /// /// /// /// public long SortedSetAdd(RedisKey key, SortedSetEntry[] values, CommandFlags flags) { return FDBOpera(db.SortedSetAdd, key, values, flags); } /// /// /// /// /// /// /// /// public long SortedSetAdd(RedisKey key, SortedSetEntry[] values, When when = When.Always, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.SortedSetAdd, key, values, when, flags); } /// /// /// /// /// /// /// /// /// /// public long SortedSetCombineAndStore(SetOperation operation, RedisKey destination, RedisKey first, RedisKey second, Aggregate aggregate = Aggregate.Sum, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.SortedSetCombineAndStore, operation, destination, first, second, aggregate, flags); } /// /// /// /// /// /// /// /// /// /// public long SortedSetCombineAndStore(SetOperation operation, RedisKey destination, RedisKey[] keys, double[] weights = null, Aggregate aggregate = Aggregate.Sum, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.SortedSetCombineAndStore, operation, destination, keys, weights, aggregate, flags); } /// /// /// /// /// /// /// /// public double SortedSetDecrement(RedisKey key, RedisValue member, double value, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.SortedSetDecrement, key, member, value, flags); } /// /// /// /// /// /// /// /// public double SortedSetIncrement(RedisKey key, RedisValue member, double value, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.SortedSetIncrement, key, member, value, flags); } /// /// /// /// /// /// /// /// /// public long SortedSetLength(RedisKey key, double min = double.NegativeInfinity, double max = double.PositiveInfinity, Exclude exclude = Exclude.None, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.SortedSetLength, key, min, max, exclude, flags); } /// /// /// /// /// /// /// /// /// public long SortedSetLengthByValue(RedisKey key, RedisValue min, RedisValue max, Exclude exclude = Exclude.None, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.SortedSetLengthByValue, key, min, max, exclude, flags); } /// /// /// /// /// /// /// /// /// public RedisValue[] SortedSetRangeByRank(RedisKey key, long start = 0L, long stop = -1L, Order order = Order.Ascending, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.SortedSetRangeByRank, key, start, stop, order, flags); } /// /// /// /// /// /// /// /// /// public SortedSetEntry[] SortedSetRangeByRankWithScores(RedisKey key, long start = 0L, long stop = -1L, Order order = Order.Ascending, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.SortedSetRangeByRankWithScores, key, start, stop, order, flags); } /// /// /// /// /// /// /// /// /// /// /// /// public RedisValue[] SortedSetRangeByScore(RedisKey key, double start = double.NegativeInfinity, double stop = double.PositiveInfinity, Exclude exclude = Exclude.None, Order order = Order.Ascending, long skip = 0L, long take = -1L, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.SortedSetRangeByScore, key, start, stop, exclude, order, skip, take, flags); } /// /// /// /// /// /// /// /// /// /// /// /// public SortedSetEntry[] SortedSetRangeByScoreWithScores(RedisKey key, double start = double.NegativeInfinity, double stop = double.PositiveInfinity, Exclude exclude = Exclude.None, Order order = Order.Ascending, long skip = 0L, long take = -1L, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.SortedSetRangeByScoreWithScores, key, start, stop, exclude, order, skip, take, flags); } /// /// /// /// /// /// /// /// /// /// /// public RedisValue[] SortedSetRangeByValue(RedisKey key, RedisValue min = default(RedisValue), RedisValue max = default(RedisValue), Exclude exclude = Exclude.None, long skip = 0L, long take = -1L, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.SortedSetRangeByValue, key, min, max, exclude, skip, take, flags); } /// /// /// /// /// /// /// /// public long? SortedSetRank(RedisKey key, RedisValue member, Order order = Order.Ascending, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.SortedSetRank, key, member, order, flags); } /// /// /// /// /// /// /// public bool SortedSetRemove(RedisKey key, RedisValue member, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.SortedSetRemove, key, member, flags); } /// /// /// /// /// /// /// public long SortedSetRemove(RedisKey key, RedisValue[] members, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.SortedSetRemove, key, members, flags); } /// /// /// /// /// /// /// /// public long SortedSetRemoveRangeByRank(RedisKey key, long start, long stop, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.SortedSetRemoveRangeByRank, key, start, stop, flags); } /// /// /// /// /// /// /// /// /// public long SortedSetRemoveRangeByScore(RedisKey key, double start, double stop, Exclude exclude = Exclude.None, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.SortedSetRemoveRangeByScore, key, start, stop, exclude, flags); } /// /// /// /// /// /// /// /// /// public long SortedSetRemoveRangeByValue(RedisKey key, RedisValue min, RedisValue max, Exclude exclude = Exclude.None, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.SortedSetRemoveRangeByValue, key, min, max, exclude, flags); } /// /// /// /// /// /// /// /// public IEnumerable SortedSetScan(RedisKey key, RedisValue pattern, int pageSize, CommandFlags flags) { return FDBOpera(db.SortedSetScan, key, pattern, pageSize, flags); } /// /// /// /// /// /// /// /// /// /// public IEnumerable SortedSetScan(RedisKey key, RedisValue pattern = default(RedisValue), int pageSize = 10, long cursor = 0L, int pageOffset = 0, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.SortedSetScan, key, pattern, pageSize, cursor, pageOffset, flags); } /// /// /// /// /// /// /// public double? SortedSetScore(RedisKey key, RedisValue member, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.SortedSetScore, key, member, flags); } /// /// 字符串追加 /// /// /// /// /// public long StringAppend(RedisKey key, RedisValue value, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.StringAppend, key, value, flags); } /// /// 某范围二进制中出现1的次数 /// /// /// /// /// /// public long StringBitCount(RedisKey key, long start = 0L, long end = -1L, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.StringBitCount, key, start, end, flags); } /// /// first 与 second做位运算,结果放在destination中 /// /// /// /// /// /// /// 返回运算后的字符串长度 public long StringBitOperation(Bitwise operation, RedisKey destination, RedisKey first, RedisKey second = default(RedisKey), CommandFlags flags = CommandFlags.None) { return FDBOpera(db.StringBitOperation, operation, destination, first, second, flags); } /// /// 一堆值做位运算。 /// /// /// /// /// /// public long StringBitOperation(Bitwise operation, RedisKey destination, RedisKey[] keys, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.StringBitOperation, operation, destination, keys, flags); } /// /// 获取二进制中第一次出现1或0的位置 /// /// /// /// /// /// /// 返回其位置 public long StringBitPosition(RedisKey key, bool bit, long start = 0L, long end = -1L, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.StringBitPosition, key, bit, start, end, flags); } /// /// 数值减去一个值 /// /// /// 减去的值 /// /// 返回减去后得到的结果 public long StringDecrement(RedisKey key, long value = 1L, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.StringDecrement, key, value, flags); } /// /// 数值减去一个值 /// /// /// 减去的值 /// /// 返回减去后得到的结果 public double StringDecrement(RedisKey key, double value, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.StringDecrement, key, value, flags); } /// /// 获取String的值 /// /// /// /// public RedisValue StringGet(RedisKey key, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.StringGet, key, flags); } /// /// 获取一组String的值 /// /// /// /// public RedisValue[] StringGet(RedisKey[] keys, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.StringGet, keys, flags); } /// /// 获取某位二进制的值 /// /// /// /// /// 返回原来的值 public bool StringGetBit(RedisKey key, long offset, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.StringGetBit, key, offset, flags); } /// /// 获取String的一个范围 /// /// /// /// /// /// public RedisValue StringGetRange(RedisKey key, long start, long end, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.StringGetRange, key, start, end, flags); } /// /// 获取原来的String 并用新值替换 /// /// /// /// /// public RedisValue StringGetSet(RedisKey key, RedisValue value, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.StringGetSet, key, value, flags); } /// /// 获取String以及key的过期时间 /// /// /// /// public RedisValueWithExpiry StringGetWithExpiry(RedisKey key, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.StringGetWithExpiry, key, flags); } /// /// 数值增加一个值 /// /// /// /// /// public long StringIncrement(RedisKey key, long value = 1L, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.StringIncrement, key, value, flags); } /// /// 数值增加一个值 /// /// /// /// /// public double StringIncrement(RedisKey key, double value, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.StringIncrement, key, value, flags); } /// /// 获取字符串长 /// /// /// /// public long StringLength(RedisKey key, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.StringLength, key, flags); } /// /// 设置值字符串 /// /// 字符串的键 /// 字符串的值 /// 过期时间 /// 那种情况设置值 /// 用于操作的标记 /// true 设置成功 false设置失败 /// https://redis.io/commands/set public bool StringSet(RedisKey key, RedisValue value, TimeSpan? expiry = null, When when = When.Always, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.StringSet, key, value, expiry, when, flags); } /// /// 设置一组字符串值 /// /// 字符串键值对 /// 设置的条件,要么都通过,要么都不通过 /// 操作的类型 /// true 表示成功 false表示失败 public bool StringSet(KeyValuePair[] values, When when = When.Always, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.StringSet, values, when, flags); } /// /// 设置某位二进制的值 /// /// /// /// /// /// 返回二进制中原来的值 public bool StringSetBit(RedisKey key, long offset, bool bit, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.StringSetBit, key, offset, bit, flags); } /// /// 从偏移量offset 开始 使用 value填充,如果原来没有值或者原来的长度小于 offset ,那从原来的字符串开始到offset使用'\0'字符填充。 /// /// /// /// /// /// 修改后string的长度 public RedisValue StringSetRange(RedisKey key, long offset, RedisValue value, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.StringSetRange, key, offset, value, flags); } /// /// /// /// /// /// public Task DebugObjectAsync(RedisKey key, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.DebugObjectAsync, key, flags); } /// /// /// /// /// /// /// /// /// public Task GeoAddAsync(RedisKey key, double longitude, double latitude, RedisValue member, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.GeoAddAsync, key, longitude, latitude, member, flags); } /// /// /// /// /// /// /// public Task GeoAddAsync(RedisKey key, GeoEntry value, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.GeoAddAsync, key, value, flags); } /// /// /// /// /// /// /// public Task GeoAddAsync(RedisKey key, GeoEntry[] values, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.GeoAddAsync, key, values, flags); } /// /// /// /// /// /// /// public Task GeoRemoveAsync(RedisKey key, RedisValue member, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.GeoRemoveAsync, key, member, flags); } /// /// /// /// /// /// /// /// /// public Task GeoDistanceAsync(RedisKey key, RedisValue member1, RedisValue member2, GeoUnit unit = GeoUnit.Meters, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.GeoDistanceAsync, key, member1, member2, unit, flags); } /// /// /// /// /// /// /// public Task GeoHashAsync(RedisKey key, RedisValue[] members, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.GeoHashAsync, key, members, flags); } /// /// /// /// /// /// /// public Task GeoHashAsync(RedisKey key, RedisValue member, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.GeoHashAsync, key, member, flags); } /// /// /// /// /// /// /// public Task GeoPositionAsync(RedisKey key, RedisValue[] members, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.GeoPositionAsync, key, members, flags); } /// /// /// /// /// /// /// public Task GeoPositionAsync(RedisKey key, RedisValue member, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.GeoPositionAsync, key, member, flags); } /// /// /// /// /// /// /// /// /// /// /// /// public Task GeoRadiusAsync(RedisKey key, RedisValue member, double radius, GeoUnit unit = GeoUnit.Meters, int count = -1, Order? order = null, GeoRadiusOptions options = GeoRadiusOptions.Default, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.GeoRadiusAsync, key, member, radius, unit, count, order, options, flags); } /// /// /// /// /// /// /// /// /// /// /// /// /// public Task GeoRadiusAsync(RedisKey key, double longitude, double latitude, double radius, GeoUnit unit = GeoUnit.Meters, int count = -1, Order? order = null, GeoRadiusOptions options = GeoRadiusOptions.Default, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.GeoRadiusAsync, key, longitude, latitude, radius, unit, count, order, options, flags); } /// /// /// /// /// /// /// /// public Task HashDecrementAsync(RedisKey key, RedisValue hashField, long value = 1L, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.HashDecrementAsync, key, hashField, value, flags); } /// /// /// /// /// /// /// /// public Task HashDecrementAsync(RedisKey key, RedisValue hashField, double value, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.HashDecrementAsync, key, hashField, value, flags); } /// /// /// /// /// /// /// public Task HashDeleteAsync(RedisKey key, RedisValue hashField, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.HashDeleteAsync, key, hashField, flags); } /// /// /// /// /// /// /// public Task HashDeleteAsync(RedisKey key, RedisValue[] hashFields, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.HashDeleteAsync, key, hashFields, flags); } /// /// /// /// /// /// /// public Task HashExistsAsync(RedisKey key, RedisValue hashField, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.HashExistsAsync, key, hashField, flags); } /// /// /// /// /// /// public Task HashGetAllAsync(RedisKey key, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.HashGetAllAsync, key, flags); } /// /// /// /// /// /// /// public Task HashGetAsync(RedisKey key, RedisValue hashField, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.HashGetAsync, key, hashField, flags); } /// /// /// /// /// /// /// public Task HashGetAsync(RedisKey key, RedisValue[] hashFields, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.HashGetAsync, key, hashFields, flags); } /// /// /// /// /// /// /// /// public Task HashIncrementAsync(RedisKey key, RedisValue hashField, long value = 1L, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.HashIncrementAsync, key, hashField, value, flags); } /// /// /// /// /// /// /// /// public Task HashIncrementAsync(RedisKey key, RedisValue hashField, double value, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.HashIncrementAsync, key, hashField, value, flags); } /// /// /// /// /// /// public Task HashKeysAsync(RedisKey key, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.HashKeysAsync, key, flags); } /// /// /// /// /// /// public Task HashLengthAsync(RedisKey key, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.HashLengthAsync, key, flags); } /// /// /// /// /// /// /// public Task HashSetAsync(RedisKey key, HashEntry[] hashFields, CommandFlags flags = CommandFlags.None) { return ADBOperaAsync(db.HashSetAsync, key, hashFields, flags); } /// /// /// /// /// /// /// /// /// public Task HashSetAsync(RedisKey key, RedisValue hashField, RedisValue value, When when = When.Always, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.HashSetAsync, key, hashField, value, when, flags); } /// /// /// /// /// /// public Task HashValuesAsync(RedisKey key, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.HashValuesAsync, key, flags); } /// /// /// /// /// /// /// public Task HyperLogLogAddAsync(RedisKey key, RedisValue value, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.HyperLogLogAddAsync, key, value, flags); } /// /// /// /// /// /// /// public Task HyperLogLogAddAsync(RedisKey key, RedisValue[] values, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.HyperLogLogAddAsync, key, values, flags); } /// /// /// /// /// /// public Task HyperLogLogLengthAsync(RedisKey key, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.HyperLogLogLengthAsync, key, flags); } /// /// /// /// /// /// public Task HyperLogLogLengthAsync(RedisKey[] keys, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.HyperLogLogLengthAsync, keys, flags); } /// /// /// /// /// /// /// /// public Task HyperLogLogMergeAsync(RedisKey destination, RedisKey first, RedisKey second, CommandFlags flags = CommandFlags.None) { return ADBOperaAsync(db.HyperLogLogMergeAsync, destination, first, second, flags); } /// /// /// /// /// /// /// public Task HyperLogLogMergeAsync(RedisKey destination, RedisKey[] sourceKeys, CommandFlags flags = CommandFlags.None) { return ADBOperaAsync(db.HyperLogLogMergeAsync, destination, sourceKeys, flags); } /// /// /// /// /// /// public Task IdentifyEndpointAsync(RedisKey key = default(RedisKey), CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.IdentifyEndpointAsync, key, flags); } /// /// /// /// /// /// public bool IsConnected(RedisKey key, CommandFlags flags = CommandFlags.None) { return FDBOpera(db.IsConnected, key, flags); } /// /// /// /// /// /// public Task KeyDeleteAsync(RedisKey key, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.KeyDeleteAsync, key, flags); } /// /// /// /// /// /// public Task KeyDeleteAsync(RedisKey[] keys, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.KeyDeleteAsync, keys, flags); } /// /// /// /// /// /// public Task KeyDumpAsync(RedisKey key, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.KeyDumpAsync, key, flags); } /// /// /// /// /// /// public Task KeyExistsAsync(RedisKey key, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.KeyExistsAsync, key, flags); } /// /// /// /// /// /// /// public Task KeyExpireAsync(RedisKey key, TimeSpan? expiry, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.KeyExpireAsync, key, expiry, flags); } /// /// /// /// /// /// /// public Task KeyExpireAsync(RedisKey key, DateTime? expiry, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.KeyExpireAsync, key, expiry, flags); } /// /// /// /// /// /// /// /// /// /// public Task KeyMigrateAsync(RedisKey key, EndPoint toServer, int toDatabase = 0, int timeoutMilliseconds = 0, MigrateOptions migrateOptions = MigrateOptions.None, CommandFlags flags = CommandFlags.None) { return ADBOperaAsync(db.KeyMigrateAsync, key, toServer, toDatabase, timeoutMilliseconds, migrateOptions, flags); } /// /// /// /// /// /// /// public Task KeyMoveAsync(RedisKey key, int database, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.KeyMoveAsync, key, database, flags); } /// /// /// /// /// /// public Task KeyPersistAsync(RedisKey key, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.KeyPersistAsync, key, flags); } /// /// /// /// /// public Task KeyRandomAsync(CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.KeyRandomAsync, flags); } /// /// /// /// /// /// /// /// public Task KeyRenameAsync(RedisKey key, RedisKey newKey, When when = When.Always, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.KeyRenameAsync, key, newKey, when, flags); } /// /// /// /// /// /// /// /// public Task KeyRestoreAsync(RedisKey key, byte[] value, TimeSpan? expiry = null, CommandFlags flags = CommandFlags.None) { return ADBOperaAsync(db.KeyRestoreAsync, key, value, expiry, flags); } /// /// /// /// /// /// public Task KeyTimeToLiveAsync(RedisKey key, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.KeyTimeToLiveAsync, key, flags); } /// /// /// /// /// /// public Task KeyTypeAsync(RedisKey key, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.KeyTypeAsync, key, flags); } /// /// /// /// /// /// /// public Task ListGetByIndexAsync(RedisKey key, long index, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.ListGetByIndexAsync, key, index, flags); } /// /// /// /// /// /// /// /// public Task ListInsertAfterAsync(RedisKey key, RedisValue pivot, RedisValue value, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.ListInsertAfterAsync, key, pivot, value, flags); } /// /// /// /// /// /// /// /// public Task ListInsertBeforeAsync(RedisKey key, RedisValue pivot, RedisValue value, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.ListInsertBeforeAsync, key, pivot, value, flags); } /// /// /// /// /// /// public Task ListLeftPopAsync(RedisKey key, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.ListLeftPopAsync, key, flags); } /// /// /// /// /// /// /// /// public Task ListLeftPushAsync(RedisKey key, RedisValue value, When when = When.Always, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.ListLeftPushAsync, key, value, when, flags); } /// /// /// /// /// /// /// public Task ListLeftPushAsync(RedisKey key, RedisValue[] values, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.ListLeftPushAsync, key, values, flags); } /// /// /// /// /// /// public Task ListLengthAsync(RedisKey key, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.ListLengthAsync, key, flags); } /// /// /// /// /// /// /// /// public Task ListRangeAsync(RedisKey key, long start = 0L, long stop = -1L, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.ListRangeAsync, key, start, stop, flags); } /// /// /// /// /// /// /// /// public Task ListRemoveAsync(RedisKey key, RedisValue value, long count = 0L, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.ListRemoveAsync, key, value, count, flags); } /// /// /// /// /// /// public Task ListRightPopAsync(RedisKey key, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.ListRightPopAsync, key, flags); } /// /// /// /// /// /// /// public Task ListRightPopLeftPushAsync(RedisKey source, RedisKey destination, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.ListRightPopLeftPushAsync, source, destination, flags); } /// /// /// /// /// /// /// /// public Task ListRightPushAsync(RedisKey key, RedisValue value, When when = When.Always, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.ListRightPushAsync, key, value, when, flags); } /// /// /// /// /// /// /// public Task ListRightPushAsync(RedisKey key, RedisValue[] values, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.ListRightPushAsync, key, values, flags); } /// /// /// /// /// /// /// /// public Task ListSetByIndexAsync(RedisKey key, long index, RedisValue value, CommandFlags flags = CommandFlags.None) { return ADBOperaAsync(db.ListSetByIndexAsync, key, index, value, flags); } /// /// /// /// /// /// /// /// public Task ListTrimAsync(RedisKey key, long start, long stop, CommandFlags flags = CommandFlags.None) { return ADBOperaAsync(db.ListTrimAsync, key, start, stop, flags); } /// /// /// /// /// /// /// /// public Task LockExtendAsync(RedisKey key, RedisValue value, TimeSpan expiry, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.LockExtendAsync, key, value, expiry, flags); } /// /// /// /// /// /// public Task LockQueryAsync(RedisKey key, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.LockQueryAsync, key, flags); } /// /// /// /// /// /// /// public Task LockReleaseAsync(RedisKey key, RedisValue value, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.LockReleaseAsync, key, value, flags); } /// /// /// /// /// /// /// /// public Task LockTakeAsync(RedisKey key, RedisValue value, TimeSpan expiry, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.LockTakeAsync, key, value, expiry, flags); } /// /// /// /// /// /// /// public Task PublishAsync(RedisChannel channel, RedisValue message, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.PublishAsync, channel, message, flags); } /// /// /// /// /// /// /// /// public Task ScriptEvaluateAsync(string script, RedisKey[] keys = null, RedisValue[] values = null, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.ScriptEvaluateAsync, script, keys, values, flags); } /// /// /// /// /// /// /// /// public Task ScriptEvaluateAsync(byte[] hash, RedisKey[] keys = null, RedisValue[] values = null, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.ScriptEvaluateAsync, hash, keys, values, flags); } /// /// /// /// /// /// /// public Task ScriptEvaluateAsync(LuaScript script, object parameters = null, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.ScriptEvaluateAsync, script, parameters, flags); } /// /// /// /// /// /// /// public Task ScriptEvaluateAsync(LoadedLuaScript script, object parameters = null, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.ScriptEvaluateAsync, script, parameters, flags); } /// /// /// /// /// /// /// public Task SetAddAsync(RedisKey key, RedisValue value, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.SetAddAsync, key, value, flags); } /// /// /// /// /// /// /// public Task SetAddAsync(RedisKey key, RedisValue[] values, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.SetAddAsync, key, values, flags); } /// /// /// /// /// /// /// /// /// public Task SetCombineAndStoreAsync(SetOperation operation, RedisKey destination, RedisKey first, RedisKey second, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.SetCombineAndStoreAsync, operation, destination, first, second, flags); } /// /// /// /// /// /// /// /// public Task SetCombineAndStoreAsync(SetOperation operation, RedisKey destination, RedisKey[] keys, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.SetCombineAndStoreAsync, operation, destination, keys, flags); } /// /// /// /// /// /// /// /// public Task SetCombineAsync(SetOperation operation, RedisKey first, RedisKey second, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.SetCombineAsync, operation, first, second, flags); } /// /// /// /// /// /// /// public Task SetCombineAsync(SetOperation operation, RedisKey[] keys, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.SetCombineAsync, operation, keys, flags); } /// /// /// /// /// /// /// public Task SetContainsAsync(RedisKey key, RedisValue value, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.SetContainsAsync, key, value, flags); } /// /// /// /// /// /// public Task SetLengthAsync(RedisKey key, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.SetLengthAsync, key, flags); } /// /// /// /// /// /// public Task SetMembersAsync(RedisKey key, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.SetMembersAsync, key, flags); } /// /// /// /// /// /// /// /// public Task SetMoveAsync(RedisKey source, RedisKey destination, RedisValue value, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.SetMoveAsync, source, destination, value, flags); } /// /// /// /// /// /// public Task SetPopAsync(RedisKey key, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.SetPopAsync, key, flags); } /// /// /// /// /// /// public Task SetRandomMemberAsync(RedisKey key, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.SetRandomMemberAsync, key, flags); } /// /// /// /// /// /// /// public Task SetRandomMembersAsync(RedisKey key, long count, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.SetRandomMembersAsync, key, count, flags); } /// /// /// /// /// /// /// public Task SetRemoveAsync(RedisKey key, RedisValue value, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.SetRemoveAsync, key, value, flags); } /// /// /// /// /// /// /// public Task SetRemoveAsync(RedisKey key, RedisValue[] values, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.SetRemoveAsync, key, values, flags); } /// /// /// /// /// /// /// /// /// /// /// /// /// public Task SortAndStoreAsync(RedisKey destination, RedisKey key, long skip = 0L, long take = -1L, Order order = Order.Ascending, SortType sortType = SortType.Numeric, RedisValue by = default(RedisValue), RedisValue[] get = null, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.SortAndStoreAsync, destination, key, skip, take, order, sortType, by, get, flags); } /// /// /// /// /// /// /// /// /// /// /// /// public Task SortAsync(RedisKey key, long skip = 0L, long take = -1L, Order order = Order.Ascending, SortType sortType = SortType.Numeric, RedisValue by = default(RedisValue), RedisValue[] get = null, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.SortAsync, key, skip, take, order, sortType, by, get, flags); } /// /// /// /// /// /// /// /// public Task SortedSetAddAsync(RedisKey key, RedisValue member, double score, CommandFlags flags) { return FDBOperaAsync(db.SortedSetAddAsync, key, member, score, flags); } /// /// /// /// /// /// /// /// /// public Task SortedSetAddAsync(RedisKey key, RedisValue member, double score, When when = When.Always, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.SortedSetAddAsync, key, member, score, when, flags); } /// /// /// /// /// /// /// public Task SortedSetAddAsync(RedisKey key, SortedSetEntry[] values, CommandFlags flags) { return FDBOperaAsync(db.SortedSetAddAsync, key, values, flags); } /// /// /// /// /// /// /// /// public Task SortedSetAddAsync(RedisKey key, SortedSetEntry[] values, When when = When.Always, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.SortedSetAddAsync, key, values, when, flags); } /// /// /// /// /// /// /// /// /// /// public Task SortedSetCombineAndStoreAsync(SetOperation operation, RedisKey destination, RedisKey first, RedisKey second, Aggregate aggregate = Aggregate.Sum, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.SortedSetCombineAndStoreAsync, operation, destination, first, second, aggregate, flags); } /// /// /// /// /// /// /// /// /// /// public Task SortedSetCombineAndStoreAsync(SetOperation operation, RedisKey destination, RedisKey[] keys, double[] weights = null, Aggregate aggregate = Aggregate.Sum, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.SortedSetCombineAndStoreAsync, operation, destination, keys, weights, aggregate, flags); } /// /// /// /// /// /// /// /// public Task SortedSetDecrementAsync(RedisKey key, RedisValue member, double value, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.SortedSetDecrementAsync, key, member, value, flags); } /// /// /// /// /// /// /// /// public Task SortedSetIncrementAsync(RedisKey key, RedisValue member, double value, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.SortedSetIncrementAsync, key, member, value, flags); } /// /// /// /// /// /// /// /// /// public Task SortedSetLengthAsync(RedisKey key, double min = double.NegativeInfinity, double max = double.PositiveInfinity, Exclude exclude = Exclude.None, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.SortedSetLengthAsync, key, min, max, exclude, flags); } /// /// /// /// /// /// /// /// /// public Task SortedSetLengthByValueAsync(RedisKey key, RedisValue min, RedisValue max, Exclude exclude = Exclude.None, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.SortedSetLengthByValueAsync, key, min, max, exclude, flags); } /// /// /// /// /// /// /// /// /// public Task SortedSetRangeByRankAsync(RedisKey key, long start = 0L, long stop = -1L, Order order = Order.Ascending, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.SortedSetRangeByRankAsync, key, start, stop, order, flags); } /// /// /// /// /// /// /// /// /// public Task SortedSetRangeByRankWithScoresAsync(RedisKey key, long start = 0L, long stop = -1L, Order order = Order.Ascending, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.SortedSetRangeByRankWithScoresAsync, key, start, stop, order, flags); } /// /// /// /// /// /// /// /// /// /// /// /// public Task SortedSetRangeByScoreAsync(RedisKey key, double start = double.NegativeInfinity, double stop = double.PositiveInfinity, Exclude exclude = Exclude.None, Order order = Order.Ascending, long skip = 0L, long take = -1L, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.SortedSetRangeByScoreAsync, key, start, stop, exclude, order, skip, take, flags); } /// /// /// /// /// /// /// /// /// /// /// /// public Task SortedSetRangeByScoreWithScoresAsync(RedisKey key, double start = double.NegativeInfinity, double stop = double.PositiveInfinity, Exclude exclude = Exclude.None, Order order = Order.Ascending, long skip = 0L, long take = -1L, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.SortedSetRangeByScoreWithScoresAsync, key, start, stop, exclude, order, skip, take, flags); } /// /// /// /// /// /// /// /// /// /// /// public Task SortedSetRangeByValueAsync(RedisKey key, RedisValue min = default(RedisValue), RedisValue max = default(RedisValue), Exclude exclude = Exclude.None, long skip = 0L, long take = -1L, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.SortedSetRangeByValueAsync, key, min, max, exclude, skip, take, flags); } /// /// /// /// /// /// /// /// public Task SortedSetRankAsync(RedisKey key, RedisValue member, Order order = Order.Ascending, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.SortedSetRankAsync, key, member, order, flags); } /// /// /// /// /// /// /// public Task SortedSetRemoveAsync(RedisKey key, RedisValue member, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.SortedSetRemoveAsync, key, member, flags); } /// /// /// /// /// /// /// public Task SortedSetRemoveAsync(RedisKey key, RedisValue[] members, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.SortedSetRemoveAsync, key, members, flags); } /// /// /// /// /// /// /// /// public Task SortedSetRemoveRangeByRankAsync(RedisKey key, long start, long stop, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.SortedSetRemoveRangeByRankAsync, key, start, stop, flags); } /// /// /// /// /// /// /// /// /// public Task SortedSetRemoveRangeByScoreAsync(RedisKey key, double start, double stop, Exclude exclude = Exclude.None, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.SortedSetRemoveRangeByScoreAsync, key, start, stop, exclude, flags); } /// /// /// /// /// /// /// /// /// public Task SortedSetRemoveRangeByValueAsync(RedisKey key, RedisValue min, RedisValue max, Exclude exclude = Exclude.None, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.SortedSetRemoveRangeByValueAsync, key, min, max, exclude, flags); } /// /// /// /// /// /// /// public Task SortedSetScoreAsync(RedisKey key, RedisValue member, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.SortedSetScoreAsync, key, member, flags); } /// /// /// /// /// /// /// public Task StringAppendAsync(RedisKey key, RedisValue value, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.StringAppendAsync, key, value, flags); } /// /// /// /// /// /// /// /// public Task StringBitCountAsync(RedisKey key, long start = 0L, long end = -1L, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.StringBitCountAsync, key, start, end, flags); } /// /// /// /// /// /// /// /// /// public Task StringBitOperationAsync(Bitwise operation, RedisKey destination, RedisKey first, RedisKey second = default(RedisKey), CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.StringBitOperationAsync, operation, destination, first, second, flags); } /// /// /// /// /// /// /// /// public Task StringBitOperationAsync(Bitwise operation, RedisKey destination, RedisKey[] keys, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.StringBitOperationAsync, operation, destination, keys, flags); } /// /// /// /// /// /// /// /// /// public Task StringBitPositionAsync(RedisKey key, bool bit, long start = 0L, long end = -1L, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.StringBitPositionAsync, key, bit, start, end, flags); } /// /// /// /// /// /// /// public Task StringDecrementAsync(RedisKey key, long value = 1L, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.StringDecrementAsync, key, value, flags); } /// /// /// /// /// /// /// public Task StringDecrementAsync(RedisKey key, double value, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.StringDecrementAsync, key, value, flags); } /// /// /// /// /// /// public Task StringGetAsync(RedisKey key, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.StringGetAsync, key, flags); } /// /// /// /// /// /// public Task StringGetAsync(RedisKey[] keys, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.StringGetAsync, keys, flags); } /// /// /// /// /// /// /// public Task StringGetBitAsync(RedisKey key, long offset, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.StringGetBitAsync, key, offset, flags); } /// /// /// /// /// /// /// /// public Task StringGetRangeAsync(RedisKey key, long start, long end, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.StringGetRangeAsync, key, start, end, flags); } /// /// /// /// /// /// /// public Task StringGetSetAsync(RedisKey key, RedisValue value, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.StringGetSetAsync, key, value, flags); } /// /// /// /// /// /// public Task StringGetWithExpiryAsync(RedisKey key, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.StringGetWithExpiryAsync, key, flags); } /// /// /// /// /// /// /// public Task StringIncrementAsync(RedisKey key, long value = 1L, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.StringIncrementAsync, key, value, flags); } /// /// /// /// /// /// /// public Task StringIncrementAsync(RedisKey key, double value, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.StringIncrementAsync, key, value, flags); } /// /// /// /// /// /// public Task StringLengthAsync(RedisKey key, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.StringLengthAsync, key, flags); } /// /// /// /// /// /// /// /// /// public Task StringSetAsync(RedisKey key, RedisValue value, TimeSpan? expiry = null, When when = When.Always, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.StringSetAsync, key, value, expiry, when, flags); } /// /// /// /// /// /// /// public Task StringSetAsync(KeyValuePair[] values, When when = When.Always, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.StringSetAsync, values, when, flags); } /// /// /// /// /// /// /// /// public Task StringSetBitAsync(RedisKey key, long offset, bool bit, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.StringSetBitAsync, key, offset, bit, flags); } /// /// /// /// /// /// /// /// public Task StringSetRangeAsync(RedisKey key, long offset, RedisValue value, CommandFlags flags = CommandFlags.None) { return FDBOperaAsync(db.StringSetRangeAsync, key, offset, value, flags); } } }