public void Empty() { BackingStore.Clear(); }
/// <summary> /// For any <see cref="IDisposable"/> items in the store, call <see cref="IDisposable.Dispose"/> and clear out the reference to the item from the <see cref="BackingStore"/>. /// Call from <see cref="SitkaGlobalBase.ApplicationEndRequest" /> to free resources, particularly EntityFramework contexts otherwise may use up sql connection pool. /// </summary> public static void DisposeItemsAndClearStore() { BackingStore.Values.OfType <IDisposable>().ToList().ForEach(item => item.Dispose()); BackingStore.Clear(); }