public void Dispose(bool disposing) { if (disposing && (this.remoteSession != null)) { ((ClientRemoteSessionImpl)this.remoteSession).Dispose(); this.remoteSession = null; } }
public void Dispose(bool disposing) { if (!disposing || this.remoteSession == null) { return; } ((ClientRemoteSessionImpl)this.remoteSession).Dispose(); this.remoteSession = (ClientRemoteSession)null; }
internal ClientRunspacePoolDataStructureHandler(RemoteRunspacePoolInternal clientRunspacePool, TypeTable typeTable) { this.clientRunspacePoolId = clientRunspacePool.InstanceId; this.minRunspaces = clientRunspacePool.GetMinRunspaces(); this.maxRunspaces = clientRunspacePool.GetMaxRunspaces(); this.host = clientRunspacePool.Host; this.applicationArguments = clientRunspacePool.ApplicationArguments; this.remoteSession = this.CreateClientRemoteSession(clientRunspacePool); this.transportManager = this.remoteSession.SessionDataStructureHandler.TransportManager; this.transportManager.TypeTable = typeTable; this.remoteSession.StateChanged += new EventHandler <RemoteSessionStateEventArgs>(this.HandleClientRemoteSessionStateChanged); this._reconnecting = false; this.transportManager.RobustConnectionNotification += new EventHandler <ConnectionStatusEventArgs>(this.HandleRobustConnectionNotification); this.transportManager.CreateCompleted += new EventHandler <CreateCompleteEventArgs>(this.HandleSessionCreateCompleted); }
internal ClientRunspacePoolDataStructureHandler( RemoteRunspacePoolInternal clientRunspacePool, TypeTable typeTable) { using (ClientRunspacePoolDataStructureHandler.tracer.TraceConstructor((object)this)) { this.clientRunspacePoolId = clientRunspacePool.InstanceId; this.minRunspaces = clientRunspacePool.GetMinRunspaces(); this.maxRunspaces = clientRunspacePool.GetMaxRunspaces(); this.host = clientRunspacePool.Host; this.applicationArguments = clientRunspacePool.ApplicationArguments; this.remoteSession = (ClientRemoteSession)this.CreateClientRemoteSession(clientRunspacePool); this.transportManager = this.remoteSession.SessionDataStructureHandler.TransportManager; this.transportManager.TypeTable = typeTable; this.remoteSession.StateChanged += new EventHandler <RemoteSessionStateEventArgs>(this.HandleClientRemoteSessionStateChanged); } }