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
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
Methods
Register(Action)
Registers an action to be invoked when the timeout elapses.
public void Register(Action action)
Parameters
action
ActionThe action to execute on timeout.