Website Summary Files Commits Branches @commit @diff @stats
path: root / src / Web / PUSG.Web / Extensions / UtilityExtensions.cs
blob: fc964864d88ac425a908c886d3bf115538462dc0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
using System.Collections.Concurrent;

namespace PUSG.Web.Extensions
{
    public static class UtilityExtensions
    {
        public static bool Delete<TKey, TValue>(this ConcurrentDictionary<TKey, TValue> dictionary, TKey key)
        {
            TValue result = default(TValue);
            return dictionary.TryRemove(key, out result);
        }
    }
}