Class CancelEventArgsExtensions
Extensions for all elements of type CancelEventArgs
Inherited Members
Namespace: TheXDS.MCART.Types.Extensions
Assembly: MCART.dll
Syntax
public static class CancelEventArgsExtensions
Methods
| Edit this page View SourceAttempt<TCancelEventArgs>(TCancelEventArgs, EventHandler<TCancelEventArgs>?, object?, Action<TCancelEventArgs>)
Executes an event handler with these arguments, and continues with another call if the event has not been canceled.
Declaration
public static void Attempt<TCancelEventArgs>(this TCancelEventArgs evtArgs, EventHandler<TCancelEventArgs>? handler, object? sender, Action<TCancelEventArgs> continuation) where TCancelEventArgs : CancelEventArgs
Parameters
Type | Name | Description |
---|---|---|
TCancelEventArgs | evtArgs | Arguments to use in the call of the cancelable event. |
EventHandler<TCancelEventArgs> | handler | Cancelable event to execute. |
object | sender | Object that is the source of the event to generate. |
Action<TCancelEventArgs> | continuation | Continuation call in case the event has not been canceled. |
Type Parameters
Name | Description |
---|---|
TCancelEventArgs | Type that derives from CancelEventArgs for which this method is an extension. |