Skip to content

Instantly share code, notes, and snippets.

View mizrael's full-sized avatar
😼
my cat owns the keyboard.

David Guida mizrael

😼
my cat owns the keyboard.
View GitHub Profile
using System;
using System.Threading.Tasks;
namespace System.Collections.Concurrent
{
public static class ConcurrentDictionaryExtensions
{
/// <summary>
/// Provides an alternative to <see cref="ConcurrentDictionary{TKey, TValue}.GetOrAdd(TKey, Func{TKey, TValue})"/> that disposes values that implement <see cref="IDisposable"/>.
/// </summary>