Partager via


Module.Signal Method

Definition

Called to dispatch events to the common module listener

public System.Threading.Tasks.Task Signal (string id, System.Threading.CancellationToken token, Func<EventArgs> getEventData, Func<string,System.Threading.CancellationToken,Func<EventArgs>,System.Threading.Tasks.Task> signal, System.Management.Automation.InvocationInfo invocationInfo, string parameterSetName, string correlationId, string processRecordId, Exception exception);
member this.Signal : string * System.Threading.CancellationToken * Func<EventArgs> * Func<string, System.Threading.CancellationToken, Func<EventArgs>, System.Threading.Tasks.Task> * System.Management.Automation.InvocationInfo * string * string * string * Exception -> System.Threading.Tasks.Task
Public Function Signal (id As String, token As CancellationToken, getEventData As Func(Of EventArgs), signal As Func(Of String, CancellationToken, Func(Of EventArgs), Task), invocationInfo As InvocationInfo, parameterSetName As String, correlationId As String, processRecordId As String, exception As Exception) As Task

Parameters

id
String

The ID of the event

token
CancellationToken

The cancellation token for the event

getEventData
Func<EventArgs>

A delegate to get the detailed event data

signal
Func<String,CancellationToken,Func<EventArgs>,Task>

The callback for the event dispatcher

invocationInfo
InvocationInfo

The InvocationInfo from the cmdlet

parameterSetName
String

the cmdlet's parameterset name.

correlationId
String

the cmdlet's correlation id.

processRecordId
String

the cmdlet's process record correlation id.

exception
Exception

the exception that is being thrown (if available)

Returns

A Task that will be complete when handling of the event is completed.

Applies to