Commit 5b61d8ee authored by Marc Gravell's avatar Marc Gravell

track CLS compliance; KeyDeleteAsync should have been using UNLINK sometimes; make RCS happier

parent 79d527a5
// Yes, this is embarassing. However, in .NET Core the including AssemblyInfo (ifdef'd or not) will screw with
// your version numbers. Therefore, we need to move the attribute out into another file...this file.
// When .csproj merges in, this should be able to return to Properties/AssemblyInfo.cs
using System;
using System.Runtime.CompilerServices;
[assembly: InternalsVisibleTo("StackExchange.Redis.Server, PublicKey=00240000048000009400000006020000002400005253413100040000010001007791a689e9d8950b44a9a8886baad2ea180e7a8a854f158c9b98345ca5009cdd2362c84f368f1c3658c132b3c0f74e44ff16aeb2e5b353b6e0fe02f923a050470caeac2bde47a2238a9c7125ed7dab14f486a5a64558df96640933b9f2b6db188fc4a820f96dce963b662fa8864adbff38e5b4542343f162ecdc6dad16912fff")]
[assembly: InternalsVisibleTo("StackExchange.Redis.Tests, PublicKey=00240000048000009400000006020000002400005253413100040000010001007791a689e9d8950b44a9a8886baad2ea180e7a8a854f158c9b98345ca5009cdd2362c84f368f1c3658c132b3c0f74e44ff16aeb2e5b353b6e0fe02f923a050470caeac2bde47a2238a9c7125ed7dab14f486a5a64558df96640933b9f2b6db188fc4a820f96dce963b662fa8864adbff38e5b4542343f162ecdc6dad16912fff")]
[assembly: InternalsVisibleTo("NRediSearch.Test, PublicKey=00240000048000009400000006020000002400005253413100040000010001007791a689e9d8950b44a9a8886baad2ea180e7a8a854f158c9b98345ca5009cdd2362c84f368f1c3658c132b3c0f74e44ff16aeb2e5b353b6e0fe02f923a050470caeac2bde47a2238a9c7125ed7dab14f486a5a64558df96640933b9f2b6db188fc4a820f96dce963b662fa8864adbff38e5b4542343f162ecdc6dad16912fff")]
[assembly: CLSCompliant(true)]
......@@ -605,7 +605,7 @@ public long KeyDelete(RedisKey[] keys, CommandFlags flags = CommandFlags.None)
public Task<bool> KeyDeleteAsync(RedisKey key, CommandFlags flags = CommandFlags.None)
{
var cmd = GetDeleteCommand(key, flags, out var server);
var msg = Message.Create(Database, flags, RedisCommand.DEL, key);
var msg = Message.Create(Database, flags, cmd, key);
return ExecuteAsync(msg, ResultProcessor.DemandZeroOrOne, server);
}
......@@ -3770,10 +3770,7 @@ protected override bool SetResultCore(PhysicalConnection connection, Message mes
case ResultType.SimpleString:
case ResultType.BulkString:
RedisValue value = result.AsRedisValue();
var sgwem = message as StringGetWithExpiryMessage;
TimeSpan? expiry;
Exception ex;
if (sgwem != null && sgwem.UnwrapValue(out expiry, out ex))
if (message is StringGetWithExpiryMessage sgwem && sgwem.UnwrapValue(out var expiry, out var ex))
{
if (ex == null)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment