Provides data for AsyncEventHandler<TEvent> events that can be invoked asynchronously.
public class AsyncEventArgs
AsyncEventArgs
Initializes a new instance of the AsyncEventArgs class.
public AsyncEventArgs(CancellationToken cancellationToken = default)
Parameters
cancellationToken
CancellationToken
A cancellation token related to the original operation that raised the event. It's important for your handler to pass this token along to any asynchronous or long-running synchronous operations that take a token so cancellation will correctly propagate. The default value is None.
Provides a value to use with events that do not have event data.
public static readonly AsyncEventArgs Empty
Field Value
Gets a cancellation token related to the original operation that raised the event. It's important for your handler to pass this token along to any asynchronous or long-running synchronous operations that take a token so cancellation (via something like
new CancellationTokenSource(TimeSpan.FromSeconds(10)).Token
for example) will correctly propagate.
public CancellationToken CancellationToken { get; }
Property Value
public static AsyncEventArgs CreateOrDefault(CancellationToken cancellationToken)
Parameters
cancellationToken
CancellationToken
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4