Website Summary Files Commits Branches @commit @diff @stats
path: root / src / Web / PUSG.Web / Extensions / UtilityExtensions.cs
diff options
context:
space:
mode:
1 files changed, 13 insertions, 0 deletions
-rw-r--r--src/Web/PUSG.Web/Extensions/UtilityExtensions.cs13
diff --git a/src/Web/PUSG.Web/Extensions/UtilityExtensions.cs b/src/Web/PUSG.Web/Extensions/UtilityExtensions.cs
new file mode 100644
index 0000000..fc96486
--- /dev/null
+++ b/src/Web/PUSG.Web/Extensions/UtilityExtensions.cs
@@ -0,0 +1,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);
+ }
+ }
+}