In your sample, nothing creates event arguments. Usually it is done in the class declaring some event, when you invoke the event (.NET allows to invoke events only in the classes declaring corresponding event instance nowhere else), but you can only create "real" .NET classes in PowerShell if you insert C# or VB.NET code, so I have no idea why would you need creation of event arguments in your PowerShell scrip. Okay, I'll give you the idea.
First of all, you will need to load this library (Qios or whatever). I don't know what is is, so I'll show you the sample loading
System.Windows.Forms
:
$null = [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
To hide console output,
$null
is used.
The partial name of your assembly registered in GAC should come instead of "System.Windows.Forms". If your library is just a file, you can load if with
[System.Reflection.Assembly]::LoadFrom
:
http://msdn.microsoft.com/en-us/library/1009fa28%28v=vs.110%29.aspx[
^],
http://msdn.microsoft.com/en-us/library/system.reflection.assembly%28v=vs.110%29.aspx[
^] (read on using this class).
To create an object from your assembly, such as
Qios.DevSuite.Components.QCompositeEventArgs
, you do something like:
$eventArgs = New-Object Qios.DevSuite.Components.QCompositeEventArgs
or, if you need to use constructor with arguments, you need to provide them:
$eventArgs = New-Object Qios.DevSuite.Components.QCompositeEventArgs($some, $reguired, $arguments)
As simple at that.
—SA