Class TimeoutItemUtil
- Namespace
- VpnHood.Net.Toolkit.Collections
- Assembly
- VpnHood.Net.Toolkit.dll
Provides the means to clean a list of timeout items.
public static class TimeoutItemUtil
- Inheritance
-
TimeoutItemUtil
- Inherited Members
Methods
CleanupTimeoutList<T>(List<T>, TimeSpan)
Removes from a list, and disposes, the items that are disposed or unused for longer than a timeout.
public static void CleanupTimeoutList<T>(List<T> list, TimeSpan timeout) where T : ITimeoutItem
Parameters
listList<T>The list; it is not safe for concurrent use.
timeoutTimeSpanHow long an item may go unused.
Type Parameters
TThe type of the items.