Skip to content

Commit de99b24

Browse files
committed
Remove IDisposable implementation
1 parent 633d09f commit de99b24

File tree

2 files changed

+1
-22
lines changed

2 files changed

+1
-22
lines changed

src/System.Management.Automation/engine/hostifaces/PowerShell.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1862,7 +1862,6 @@ private void SetRunspace(Runspace runspace, bool owner)
18621862
if (RemotePowerShell != null)
18631863
{
18641864
RemotePowerShell.Clear();
1865-
RemotePowerShell.Dispose();
18661865
}
18671866

18681867
RemotePowerShell = new ClientRemotePowerShell(this, remoteRunspace.RunspacePool.RemoteRunspacePoolInternal);
@@ -1924,7 +1923,6 @@ public RunspacePool RunspacePool
19241923
if (RemotePowerShell != null)
19251924
{
19261925
RemotePowerShell.Clear();
1927-
RemotePowerShell.Dispose();
19281926
}
19291927

19301928
RemotePowerShell = new
@@ -4173,11 +4171,6 @@ private void Dispose(bool disposing)
41734171
_runspace.Dispose();
41744172
}
41754173

4176-
if (RemotePowerShell != null)
4177-
{
4178-
RemotePowerShell.Dispose();
4179-
}
4180-
41814174
_invokeAsyncResult = null;
41824175
_stopAsyncResult = null;
41834176
}

src/System.Management.Automation/engine/remoting/client/ClientRemotePowerShell.cs

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ namespace System.Management.Automation.Runspaces.Internal
1515
/// PowerShell client side proxy base which handles invocation
1616
/// of powershell on a remote machine.
1717
/// </summary>
18-
internal sealed class ClientRemotePowerShell : IDisposable
18+
internal sealed class ClientRemotePowerShell
1919
{
2020
#region Tracer
2121

@@ -934,20 +934,6 @@ private void HandleRobustConnectionNotification(
934934
private PSConnectionRetryStatus _connectionRetryStatus = PSConnectionRetryStatus.None;
935935

936936
#endregion Private Fields
937-
938-
#region IDisposable
939-
940-
/// <summary>
941-
/// Release all resources.
942-
/// </summary>
943-
public void Dispose()
944-
{
945-
// inputstream.Dispose();
946-
// outputstream.Dispose();
947-
// errorstream.Dispose();
948-
}
949-
950-
#endregion IDisposable
951937
}
952938

953939
#region PSConnectionRetryStatusEventArgs

0 commit comments

Comments
 (0)