Class TimeoutItem
- Namespace
- VpnHood.Net.Toolkit.Collections
- Assembly
- VpnHood.Net.Toolkit.dll
Provides a base for the values of a TimeoutDictionary<TKey, TValue>: the last-used time and the disposed state.
public class TimeoutItem : ITimeoutItem, IDisposable
- Inheritance
-
TimeoutItem
- Implements
- Derived
- Inherited Members
- Extension Methods
Properties
IsDisposed
Gets a value indicating whether the item is disposed. A disposed item counts as expired: it is evicted on access, or by a cleanup when the dictionary has a timeout.
public bool IsDisposed { get; }
Property Value
LastUsedTime
Gets or sets the last time the item was used, in UTC. The dictionary refreshes it on each access.
public DateTime LastUsedTime { get; set; }
Property Value
Methods
Dispose()
Disposes the item, once: a second call, or one at the same moment, does nothing.
public void Dispose()
Dispose(bool)
Releases the item. A derived class releases its own resources here and calls the base, which marks the item disposed.
protected virtual void Dispose(bool disposing)