Dv
Size: a a a
Dv
nn
DT
Console.WriteLine
?g
I
DT
Console.WriteLine
?EB
EB
Dv
IM
IM
using System;
using System.Management.Automation;
static void HandleData (object sender, DataAddedEventArgs e)
{
InformationRecord newRecord = ((PSDataCollection<InformationRecord>)sender)[e.Index];
Console.WriteLine(newRecord.ToString());
}
PowerShell ps = PowerShell.Create();
ps.AddScript("Write-Host Hello world");
ps.Streams.Information.DataAdded += HandleData;
ps.Invoke();
оГ
I
using System;
using System.Management.Automation;
static void HandleData (object sender, DataAddedEventArgs e)
{
InformationRecord newRecord = ((PSDataCollection<InformationRecord>)sender)[e.Index];
Console.WriteLine(newRecord.ToString());
}
PowerShell ps = PowerShell.Create();
ps.AddScript("Write-Host Hello world");
ps.Streams.Information.DataAdded += HandleData;
ps.Invoke();
IM
Streams.Information.DataAdded.AddHandler
Streams.Information.DataAdded.Subscribe
IM
оГ
I
Streams.Information.DataAdded.AddHandler
Streams.Information.DataAdded.Subscribe
IM