次の方法で共有


AsyncMulticastDelegate<TParam1>.InvokeHandlerIfInInvocationListAsync Method

Definition

Atomically checks if value is in the invocation list and invokes it if it is.

public System.Threading.Tasks.Task<bool> InvokeHandlerIfInInvocationListAsync (Func<TParam1,System.Threading.Tasks.Task> value, TParam1 param1);
member this.InvokeHandlerIfInInvocationListAsync : Func<'TParam1, System.Threading.Tasks.Task> * 'TParam1 -> System.Threading.Tasks.Task<bool>
Public Function InvokeHandlerIfInInvocationListAsync (value As Func(Of TParam1, Task), param1 As TParam1) As Task(Of Boolean)

Parameters

value
Func<TParam1,Task>

The handler to invoke.

param1
TParam1

The first parameter to the handler.

Returns

A task tracking the asynchronous execution if value and containing the value true, if value is present in the invocation list, otherwise a completed task containing the value false.

Remarks

The execution of value is started on the current thread.

Concurrent calls to methods of this class from other threads, will block until InvokeHandlerIfInInvocationListAsync(Func<TParam1,Task>, TParam1) returns the Task to the caller.

Applies to