public void Dispose(bool disposing)
 {
     if (disposing && (this.remoteSession != null))
     {
         ((ClientRemoteSessionImpl)this.remoteSession).Dispose();
         this.remoteSession = null;
     }
 }
示例#2
0
 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);
 }
示例#4
0
 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);
     }
 }