Beispiel #1
0
        internal ServerRemoteSession(PSSenderInfo senderInfo, string configurationProviderId, string initializationParameters, AbstractServerSessionTransportManager transportManager)
        {
            NativeCommandProcessor.IsServerSide = true;
            this._senderInfo = senderInfo;
            this._configProviderId = configurationProviderId;
            this._initParameters = initializationParameters;
            this._cryptoHelper = (PSRemotingCryptoHelperServer) transportManager.CryptoHelper;
			this._cryptoHelper.Session = this;
            this._context = new ServerRemoteSessionContext();
            this._sessionDSHandler = new ServerRemoteSessionDSHandlerlImpl(this, transportManager);
            base.BaseSessionDataStructureHandler = this._sessionDSHandler;
            this._sessionDSHandler.CreateRunspacePoolReceived += new EventHandler<RemoteDataEventArgs>(this.HandleCreateRunspacePool);
            this._sessionDSHandler.NegotiationReceived += new EventHandler<RemoteSessionNegotiationEventArgs>(this.HandleNegotiationReceived);
            this._sessionDSHandler.SessionClosing += new EventHandler<EventArgs>(this.HandleSessionDSHandlerClosing);
            this._sessionDSHandler.PublicKeyReceived += new EventHandler<RemoteDataEventArgs<string>>(this.HandlePublicKeyReceived);
            transportManager.Closing += new EventHandler(this.HandleResourceClosing);
            transportManager.ReceivedDataCollection.MaximumReceivedObjectSize = 0xa00000;
            transportManager.ReceivedDataCollection.MaximumReceivedDataSize = null;
        }
 internal ServerRemoteSession(PSSenderInfo senderInfo, string configurationProviderId, string initializationParameters, AbstractServerSessionTransportManager transportManager)
 {
     NativeCommandProcessor.IsServerSide = true;
     this._senderInfo           = senderInfo;
     this._configProviderId     = configurationProviderId;
     this._initParameters       = initializationParameters;
     this._cryptoHelper         = (PSRemotingCryptoHelperServer)transportManager.CryptoHelper;
     this._cryptoHelper.Session = this;
     this._context          = new ServerRemoteSessionContext();
     this._sessionDSHandler = new ServerRemoteSessionDSHandlerlImpl(this, transportManager);
     base.BaseSessionDataStructureHandler = this._sessionDSHandler;
     this._sessionDSHandler.CreateRunspacePoolReceived += new EventHandler <RemoteDataEventArgs>(this.HandleCreateRunspacePool);
     this._sessionDSHandler.NegotiationReceived        += new EventHandler <RemoteSessionNegotiationEventArgs>(this.HandleNegotiationReceived);
     this._sessionDSHandler.SessionClosing             += new EventHandler <EventArgs>(this.HandleSessionDSHandlerClosing);
     this._sessionDSHandler.PublicKeyReceived          += new EventHandler <RemoteDataEventArgs <string> >(this.HandlePublicKeyReceived);
     transportManager.Closing += new EventHandler(this.HandleResourceClosing);
     transportManager.ReceivedDataCollection.MaximumReceivedObjectSize = 0xa00000;
     transportManager.ReceivedDataCollection.MaximumReceivedDataSize   = null;
 }