Condividi tramite


PSEventManager.GenerateEvent Method

Definition

Overloads

GenerateEvent(String, Object, Object[], PSObject)

Generate a PowerShell event.

GenerateEvent(String, Object, Object[], PSObject, Boolean, Boolean)

Generate a PowerShell event.

GenerateEvent(String, Object, Object[], PSObject)

Generate a PowerShell event.

public:
 System::Management::Automation::PSEventArgs ^ GenerateEvent(System::String ^ sourceIdentifier, System::Object ^ sender, cli::array <System::Object ^> ^ args, System::Management::Automation::PSObject ^ extraData);
public System.Management.Automation.PSEventArgs GenerateEvent (string sourceIdentifier, object sender, object[] args, System.Management.Automation.PSObject extraData);
member this.GenerateEvent : string * obj * obj[] * System.Management.Automation.PSObject -> System.Management.Automation.PSEventArgs
Public Function GenerateEvent (sourceIdentifier As String, sender As Object, args As Object(), extraData As PSObject) As PSEventArgs

Parameters

sourceIdentifier
String

An optional identifier that identifies the source event

sender
Object

The object that generated this event

args
Object[]

Any event-specific data associated with the event.

extraData
PSObject

Any additional data you wish to attach to the event

Returns

Applies to

GenerateEvent(String, Object, Object[], PSObject, Boolean, Boolean)

Generate a PowerShell event.

public:
 System::Management::Automation::PSEventArgs ^ GenerateEvent(System::String ^ sourceIdentifier, System::Object ^ sender, cli::array <System::Object ^> ^ args, System::Management::Automation::PSObject ^ extraData, bool processInCurrentThread, bool waitForCompletionInCurrentThread);
public System.Management.Automation.PSEventArgs GenerateEvent (string sourceIdentifier, object sender, object[] args, System.Management.Automation.PSObject extraData, bool processInCurrentThread, bool waitForCompletionInCurrentThread);
member this.GenerateEvent : string * obj * obj[] * System.Management.Automation.PSObject * bool * bool -> System.Management.Automation.PSEventArgs
Public Function GenerateEvent (sourceIdentifier As String, sender As Object, args As Object(), extraData As PSObject, processInCurrentThread As Boolean, waitForCompletionInCurrentThread As Boolean) As PSEventArgs

Parameters

sourceIdentifier
String

An optional identifier that identifies the source event

sender
Object

The object that generated this event

args
Object[]

Any event-specific data associated with the event.

extraData
PSObject

Any additional data you wish to attach to the event

processInCurrentThread
Boolean

True if the event should be triggered in current thread. False for the event to be triggered in a separate thread.

waitForCompletionInCurrentThread
Boolean

Wait for the event and associated action to be processed and completed.

Returns

Applies to