Table of Contents

Class AsyncTimeout

Namespace
Ecng.ComponentModel
Assembly
Ecng.ComponentModel.dll

Represents an asynchronous timeout for an operation.

public class AsyncTimeout
Inheritance
AsyncTimeout
Inherited Members
Extension Methods

Constructors

AsyncTimeout(TimeSpan)

Initializes a new instance of the AsyncTimeout class with the specified timeout value.

public AsyncTimeout(TimeSpan value)

Parameters

value TimeSpan

The timeout duration. Must be greater than Zero.

Exceptions

ArgumentOutOfRangeException

Thrown when value is less than or equal to Zero.

Properties

Value

Gets the configured timeout value.

public TimeSpan Value { get; }

Property Value

TimeSpan

Methods

Register(Action)

Registers an action to be invoked when the timeout elapses.

public void Register(Action action)

Parameters

action Action

The action to execute on timeout.