コード例 #1
0
        /// <summary>
        /// Constructor for ServerRemoteHost.
        /// </summary>
        internal ServerRemoteHost(
            Guid clientRunspacePoolId,
            Guid clientPowerShellId,
            HostInfo hostInfo,
            AbstractServerTransportManager transportManager,
            Runspace runspace,
            ServerDriverRemoteHost serverDriverRemoteHost)
        {
            _clientRunspacePoolId = clientRunspacePoolId;
            _clientPowerShellId   = clientPowerShellId;
            Dbg.Assert(hostInfo != null, "Expected hostInfo != null");
            Dbg.Assert(transportManager != null, "Expected transportManager != null");

            // Set host-info and the transport-manager.
            HostInfo                = hostInfo;
            _transportManager       = transportManager;
            _serverDriverRemoteHost = serverDriverRemoteHost;

            // Create the executor for the host methods.
            _serverMethodExecutor = new ServerMethodExecutor(
                clientRunspacePoolId, clientPowerShellId, _transportManager);

            // Use HostInfo to create host-UI as null or non-null based on the client's host-UI.
            _remoteHostUserInterface = hostInfo.IsHostUINull ? null : new ServerRemoteHostUserInterface(this);

            Runspace = runspace;
        }
コード例 #2
0
ファイル: ServerRemoteHost.cs プロジェクト: 40a/PowerShell
        /// <summary>
        /// Constructor for ServerRemoteHost.
        /// </summary>
        internal ServerRemoteHost(
            Guid clientRunspacePoolId,
            Guid clientPowerShellId,
            HostInfo hostInfo,
            AbstractServerTransportManager transportManager,
            Runspace runspace,
            ServerDriverRemoteHost serverDriverRemoteHost)
        {
            _clientRunspacePoolId = clientRunspacePoolId;
            _clientPowerShellId = clientPowerShellId;
            Dbg.Assert(hostInfo != null, "Expected hostInfo != null");
            Dbg.Assert(transportManager != null, "Expected transportManager != null");

            // Set host-info and the transport-manager.
            HostInfo = hostInfo;
            _transportManager = transportManager;
            _serverDriverRemoteHost = serverDriverRemoteHost;

            // Create the executor for the host methods.
            _serverMethodExecutor = new ServerMethodExecutor(
                clientRunspacePoolId, clientPowerShellId, _transportManager);

            // Use HostInfo to create host-UI as null or non-null based on the client's host-UI.
            _remoteHostUserInterface = hostInfo.IsHostUINull ? null : new ServerRemoteHostUserInterface(this);

            Runspace = runspace;
        }
コード例 #3
0
        /// <summary>
        /// Constructor for ServerRemoteHostRawUserInterface.
        /// </summary>
        internal ServerRemoteHostRawUserInterface(ServerRemoteHostUserInterface remoteHostUserInterface)
        {
            Dbg.Assert(remoteHostUserInterface != null, "Expected remoteHostUserInterface != null");
            _remoteHostUserInterface = remoteHostUserInterface;
            Dbg.Assert(!remoteHostUserInterface.ServerRemoteHost.HostInfo.IsHostRawUINull, "Expected !remoteHostUserInterface.ServerRemoteHost.HostInfo.IsHostRawUINull");

            _serverMethodExecutor = remoteHostUserInterface.ServerRemoteHost.ServerMethodExecutor;
        }
コード例 #4
0
        /// <summary>
        /// Constructor for ServerRemoteHostRawUserInterface.
        /// </summary>
        internal ServerRemoteHostRawUserInterface(ServerRemoteHostUserInterface remoteHostUserInterface)
        {
            Dbg.Assert(remoteHostUserInterface != null, "Expected remoteHostUserInterface != null");
            _remoteHostUserInterface = remoteHostUserInterface;
            Dbg.Assert(!remoteHostUserInterface.ServerRemoteHost.HostInfo.IsHostRawUINull, "Expected !remoteHostUserInterface.ServerRemoteHost.HostInfo.IsHostRawUINull");

            _serverMethodExecutor = remoteHostUserInterface.ServerRemoteHost.ServerMethodExecutor;
        }
コード例 #5
0
 internal ServerRemoteHost(Guid clientRunspacePoolId, Guid clientPowerShellId, System.Management.Automation.Remoting.HostInfo hostInfo, AbstractServerTransportManager transportManager)
 {
     this._clientRunspacePoolId    = clientRunspacePoolId;
     this._clientPowerShellId      = clientPowerShellId;
     this._hostInfo                = hostInfo;
     this._transportManager        = transportManager;
     this._serverMethodExecutor    = new System.Management.Automation.Remoting.ServerMethodExecutor(clientRunspacePoolId, clientPowerShellId, this._transportManager);
     this._remoteHostUserInterface = hostInfo.IsHostUINull ? null : new ServerRemoteHostUserInterface(this);
 }
コード例 #6
0
ファイル: ServerRemoteHost.cs プロジェクト: nickchal/pash
 internal ServerRemoteHost(Guid clientRunspacePoolId, Guid clientPowerShellId, System.Management.Automation.Remoting.HostInfo hostInfo, AbstractServerTransportManager transportManager)
 {
     this._clientRunspacePoolId = clientRunspacePoolId;
     this._clientPowerShellId = clientPowerShellId;
     this._hostInfo = hostInfo;
     this._transportManager = transportManager;
     this._serverMethodExecutor = new System.Management.Automation.Remoting.ServerMethodExecutor(clientRunspacePoolId, clientPowerShellId, this._transportManager);
     this._remoteHostUserInterface = hostInfo.IsHostUINull ? null : new ServerRemoteHostUserInterface(this);
 }
コード例 #7
0
 internal ServerRemoteHostRawUserInterface(
     ServerRemoteHostUserInterface remoteHostUserInterface)
 {
     this._remoteHostUserInterface = remoteHostUserInterface;
     this._serverMethodExecutor    = remoteHostUserInterface.ServerRemoteHost.ServerMethodExecutor;
 }
コード例 #8
0
 internal ServerRemoteHostRawUserInterface(ServerRemoteHostUserInterface remoteHostUserInterface)
 {
     this._remoteHostUserInterface = remoteHostUserInterface;
     this._serverMethodExecutor = remoteHostUserInterface.ServerRemoteHost.ServerMethodExecutor;
 }