次の方法で共有


IGuardedOperations.RaiseEventOnBackgroundAsync<TArgs> Method

Definition

Safely raises an event on a background thread with specified args. Errors are tracked per sender, performance is tracked per handler.

public:
generic <typename TArgs>
 where TArgs : EventArgs System::Threading::Tasks::Task ^ RaiseEventOnBackgroundAsync(System::Object ^ sender, Microsoft::VisualStudio::Threading::AsyncEventHandler<TArgs> ^ eventHandlers, TArgs args);
public System.Threading.Tasks.Task RaiseEventOnBackgroundAsync<TArgs> (object sender, Microsoft.VisualStudio.Threading.AsyncEventHandler<TArgs> eventHandlers, TArgs args) where TArgs : EventArgs;
abstract member RaiseEventOnBackgroundAsync : obj * Microsoft.VisualStudio.Threading.AsyncEventHandler<'Args (requires 'Args :> EventArgs)> * 'Args -> System.Threading.Tasks.Task (requires 'Args :> EventArgs)
Public Function RaiseEventOnBackgroundAsync(Of TArgs As EventArgs) (sender As Object, eventHandlers As AsyncEventHandler(Of TArgs), args As TArgs) As Task

Type Parameters

TArgs

Parameters

sender
Object

Reference to the sender of the event. Tracks errors.

eventHandlers
AsyncEventHandler<TArgs>

Event to raise. Each handler tracks performance.

args
TArgs

Event data.

Returns

A Task that asynchronously executes the eventHandlers.

Remarks

This class supports the Visual Studio infrastructure and in general is not intended to be used directly from your code.

Applies to