Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace System.Management.Automation.Runspaces.Internal
/// PowerShell client side proxy base which handles invocation
/// of powershell on a remote machine.
/// </summary>
internal class ClientRemotePowerShell : IDisposable
internal sealed class ClientRemotePowerShell : IDisposable
{
#region Tracer

Expand Down Expand Up @@ -902,28 +902,28 @@ private void HandleRobustConnectionNotification(

#endregion Private Methods

#region Protected Members

protected ObjectStreamBase inputstream;
protected ObjectStreamBase errorstream;
protected PSInformationalBuffers informationalBuffers;
protected PowerShell shell;
protected Guid clientRunspacePoolId;
protected bool noInput;
protected PSInvocationSettings settings;
protected ObjectStreamBase outputstream;
protected string computerName;
protected ClientPowerShellDataStructureHandler dataStructureHandler;
protected bool stopCalled = false;
protected PSHost hostToUse;
protected RemoteRunspacePoolInternal runspacePool;

protected const string WRITE_DEBUG_LINE = "WriteDebugLine";
protected const string WRITE_VERBOSE_LINE = "WriteVerboseLine";
protected const string WRITE_WARNING_LINE = "WriteWarningLine";
protected const string WRITE_PROGRESS = "WriteProgress";

protected bool initialized = false;
#region Private Fields

private ObjectStreamBase inputstream;
private ObjectStreamBase errorstream;
private PSInformationalBuffers informationalBuffers;
private readonly PowerShell shell;
private readonly Guid clientRunspacePoolId;
private bool noInput;
private PSInvocationSettings settings;
private ObjectStreamBase outputstream;
private readonly string computerName;
private ClientPowerShellDataStructureHandler dataStructureHandler;
private bool stopCalled = false;
private PSHost hostToUse;
private readonly RemoteRunspacePoolInternal runspacePool;

private const string WRITE_DEBUG_LINE = "WriteDebugLine";
private const string WRITE_VERBOSE_LINE = "WriteVerboseLine";
private const string WRITE_WARNING_LINE = "WriteWarningLine";
private const string WRITE_PROGRESS = "WriteProgress";

private bool initialized = false;
/// <summary>
/// This queue is for the state change events that resulted in closing the underlying
/// datastructure handler. We cannot send the state back to the upper layers until
Expand All @@ -933,33 +933,20 @@ private void HandleRobustConnectionNotification(

private PSConnectionRetryStatus _connectionRetryStatus = PSConnectionRetryStatus.None;

#endregion Protected Members
#endregion Private Fields

#region IDisposable

/// <summary>
/// Public interface for dispose.
/// Release all resources.
/// </summary>
public void Dispose()
{
Dispose(true);

GC.SuppressFinalize(this);
// inputstream.Dispose();
// outputstream.Dispose();
// errorstream.Dispose();
}

/// <summary>
/// Release all resources.
/// </summary>
/// <param name="disposing">If true, release all managed resources.</param>
protected void Dispose(bool disposing)
{
if (disposing)
{
// inputstream.Dispose();
// outputstream.Dispose();
// errorstream.Dispose();
}
}
#endregion IDisposable
}

Expand Down