Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/CSRedisCore/CSRedisClientAsync.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1784,7 +1784,7 @@ public Task<long> LRemAsync(string key, long count, object value)
async public Task<bool> LSetAsync(string key, long index, object value)
{
var args = this.SerializeRedisValueInternal(value);
return await ExecuteScalar(key, (c, k) => c.Value.LSetAsync(k, index, args)) == "OK";
return await ExecuteScalarAsync(key, (c, k) => c.Value.LSetAsync(k, index, args)) == "OK";
}
/// <summary>
/// 对一个列表进行修剪,让列表只保留指定区间内的元素,不在指定区间之内的元素都将被删除
Expand Down Expand Up @@ -1845,7 +1845,7 @@ async public Task<long> RPushAsync<T>(string key, params T[] value)
public Task<long> RPushXAsync(string key, object value)
{
var args = this.SerializeRedisValueInternal(value);
return ExecuteScalar(key, (c, k) => c.Value.RPushXAsync(k, args));
return ExecuteScalarAsync(key, (c, k) => c.Value.RPushXAsync(k, args));
}
#endregion

Expand Down Expand Up @@ -2221,10 +2221,10 @@ async public Task<bool> SetAsync(string key, object value, int expireSeconds = -
async public Task<bool> SetAsync(string key, object value, TimeSpan expire, RedisExistence? exists = null)
{
object redisValule = this.SerializeRedisValueInternal(value);
if (expire <= TimeSpan.Zero && exists == null) return await ExecuteScalar(key, (c, k) => c.Value.SetAsync(k, redisValule)) == "OK";
if (expire <= TimeSpan.Zero && exists != null) return await ExecuteScalar(key, (c, k) => c.Value.SetAsync(k, redisValule, null, exists)) == "OK";
if (expire > TimeSpan.Zero && exists == null) return await ExecuteScalar(key, (c, k) => c.Value.SetAsync(k, redisValule, expire, null)) == "OK";
if (expire > TimeSpan.Zero && exists != null) return await ExecuteScalar(key, (c, k) => c.Value.SetAsync(k, redisValule, expire, exists)) == "OK";
if (expire <= TimeSpan.Zero && exists == null) return await ExecuteScalarAsync(key, (c, k) => c.Value.SetAsync(k, redisValule)) == "OK";
if (expire <= TimeSpan.Zero && exists != null) return await ExecuteScalarAsync(key, (c, k) => c.Value.SetAsync(k, redisValule, null, exists)) == "OK";
if (expire > TimeSpan.Zero && exists == null) return await ExecuteScalarAsync(key, (c, k) => c.Value.SetAsync(k, redisValule, expire, null)) == "OK";
if (expire > TimeSpan.Zero && exists != null) return await ExecuteScalarAsync(key, (c, k) => c.Value.SetAsync(k, redisValule, expire, exists)) == "OK";
return false;
}
/// <summary>
Expand Down