mirror of
https://github.com/Bubuni-Team/telegram-bot.git
synced 2026-07-31 00:29:24 +03:00
🚧 Tests for MemoryCache
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user