mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 12:45:47 +00:00
Remove redundant delegate creation (#13441)
This commit is contained in:
1 parent
ac5f5f9f22
commit
1a0a5db069
3 files changed
+4
-4
No files matched your search
+1
-1
@@ -131,7 +131,7 @@ namespace Microsoft.PowerShell.Commands.Internal.Format
|
||||
}
|
||||
|
||||
// set up the callback mechanism
|
||||
pd.PrintPage += new PrintPageEventHandler(this.pd_PrintPage);
|
||||
pd.PrintPage += this.pd_PrintPage;
|
||||
|
||||
// start printing
|
||||
pd.Print();
|
||||
|
||||
+1
-1
@@ -1682,7 +1682,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
powerShell.AddParameter("ArgumentList", this.ArgumentList);
|
||||
|
||||
powerShell.Runspace = Session.Runspace;
|
||||
powerShell.RemotePowerShell.HostCallReceived += new EventHandler<RemoteDataEventArgs<RemoteHostCall>>(HandleHostCallReceived);
|
||||
powerShell.RemotePowerShell.HostCallReceived += HandleHostCallReceived;
|
||||
return powerShell;
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -278,8 +278,8 @@ namespace Microsoft.PowerShell.Commands
|
||||
// errors are not created here, because there is a field for it used in the final pop up
|
||||
PSDataCollection<object> output = new PSDataCollection<object>();
|
||||
|
||||
output.DataAdded += new EventHandler<DataAddedEventArgs>(this.Output_DataAdded);
|
||||
_errors.DataAdded += new EventHandler<DataAddedEventArgs>(this.Error_DataAdded);
|
||||
output.DataAdded += this.Output_DataAdded;
|
||||
_errors.DataAdded += this.Error_DataAdded;
|
||||
|
||||
System.Management.Automation.PowerShell ps = System.Management.Automation.PowerShell.Create(RunspaceMode.CurrentRunspace);
|
||||
ps.Streams.Error = _errors;
|
||||
|
||||
Reference in new issue
Block a user