Table of Contents

Class TimeoutItem<T>

Namespace
VpnHood.Net.Toolkit.Collections
Assembly
VpnHood.Net.Toolkit.dll

Provides a TimeoutItem that holds a value.

public sealed class TimeoutItem<T> : TimeoutItem, ITimeoutItem, IDisposable

Type Parameters

T

The type of the value.

Inheritance
TimeoutItem<T>
Implements
Inherited Members
Extension Methods

Constructors

TimeoutItem(T, bool)

Provides a TimeoutItem that holds a value.

public TimeoutItem(T value, bool autoDispose = false)

Parameters

value T

The value.

autoDispose bool

true to dispose the value with the item, when it is IDisposable.

Properties

Value

Gets or sets the value.

public T Value { get; set; }

Property Value

T

Methods

Dispose(bool)

Releases the item. A derived class releases its own resources here and calls the base, which marks the item disposed.

protected override void Dispose(bool disposing)

Parameters

disposing bool

true when called from Dispose().

Remarks

It disposes the value it holds too when made with autoDispose and the value is disposable; a value replaced by a set is not disposed.