🚧 Tests for MemoryCache

This commit is contained in:
2020-03-03 12:32:09 +04:00
parent 4a4ce10c04
commit 94de8d5894
5 changed files with 81 additions and 3 deletions
+4 -2
View File
@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using SQLitePCL;
namespace Kruzya.TelegramBot.Core.Cache
{
@@ -47,9 +48,10 @@ namespace Kruzya.TelegramBot.Core.Cache
_defaultTtl = defaultTtl;
}
public bool TryGetValue(TKey key, ref TValue value)
public bool TryGetValue(TKey key, out TValue value)
{
if (dict.ContainsKey(key))
value = default;
if (!dict.ContainsKey(key))
{
return false;
}