Class AsyncEventTimeoutException<TSender, TArgs>
Thrown whenever execution of an AsyncEventHandler<TSender, TArgs> exceeds maximum time allowed.
This is a non-fatal exception, used primarily to inform users that their code is taking too long to execute.
Inheritance
System.Object
System.Exception
AsyncEventTimeoutException<TSender, TArgs>
Namespace: DisCatSharp.Common.Utilities
Assembly: DisCatSharp.Common.dll
Syntax
public class AsyncEventTimeoutException<TSender, TArgs> : AsyncEventTimeoutException, ISerializable where TArgs : AsyncEventArgs
Type Parameters
Name | Description |
---|---|
TSender | Type of sender that dispatched this asynchronous event. |
TArgs | Type of event arguments for the asynchronous event. |
Constructors
| Improve this Doc View SourceAsyncEventTimeoutException(AsyncEvent<TSender, TArgs>, AsyncEventHandler<TSender, TArgs>)
Creates a new timeout exception for specified event and handler.
Declaration
public AsyncEventTimeoutException(AsyncEvent<TSender, TArgs> asyncEvent, AsyncEventHandler<TSender, TArgs> eventHandler)
Parameters
Type | Name | Description |
---|---|---|
AsyncEvent<TSender, TArgs> | asyncEvent | Event the execution of which timed out. |
AsyncEventHandler<TSender, TArgs> | eventHandler | Handler which timed out. |
Properties
| Improve this Doc View SourceEvent
Gets the event the invocation of which caused the timeout.
Declaration
public AsyncEvent<TSender, TArgs> Event { get; }
Property Value
Type | Description |
---|---|
AsyncEvent<TSender, TArgs> |
Handler
Gets the handler which caused the timeout.
Declaration
public AsyncEventHandler<TSender, TArgs> Handler { get; }
Property Value
Type | Description |
---|---|
AsyncEventHandler<TSender, TArgs> |