次の方法で共有


AsyncEvent<TEventArgs>.InsertCallback Method

Definition

Insert a callback in the specified position

public:
 static Microsoft::VisualStudio::Workspace::AsyncEvent<TEventArgs> ^ InsertCallback(Microsoft::VisualStudio::Workspace::AsyncEvent<TEventArgs> ^ e, int index, Func<System::Object ^, TEventArgs, System::Threading::Tasks::Task ^> ^ callback);
public static Microsoft.VisualStudio.Workspace.AsyncEvent<TEventArgs> InsertCallback (Microsoft.VisualStudio.Workspace.AsyncEvent<TEventArgs> e, int index, Func<object,TEventArgs,System.Threading.Tasks.Task> callback);
public static Microsoft.VisualStudio.Workspace.AsyncEvent<TEventArgs> InsertCallback (Microsoft.VisualStudio.Workspace.AsyncEvent<TEventArgs>? e, int index, Func<object?,TEventArgs,System.Threading.Tasks.Task> callback);
static member InsertCallback : Microsoft.VisualStudio.Workspace.AsyncEvent<'EventArgs (requires 'EventArgs :> EventArgs)> * int * Func<obj, 'EventArgs, System.Threading.Tasks.Task (requires 'EventArgs :> EventArgs)> -> Microsoft.VisualStudio.Workspace.AsyncEvent<'EventArgs (requires 'EventArgs :> EventArgs)>
Public Shared Function InsertCallback (e As AsyncEvent(Of TEventArgs), index As Integer, callback As Func(Of Object, TEventArgs, Task)) As AsyncEvent(Of TEventArgs)

Parameters

e
AsyncEvent<TEventArgs>

The async event class

index
Int32

Position where to insert the callback

callback
Func<Object,TEventArgs,Task>

Async event callback

Returns

The Async event

Applies to