Exemple #1
0
 public InProcTestEnvironment(Func <int?, MessagePackObject[], MessagePackObject> callback)
 {
     this._endPoint      = new IPEndPoint(IPAddress.Loopback, MsgPack.Rpc.Server.CallbackServer.PortNumber);
     this._server        = MsgPack.Rpc.Server.CallbackServer.Create(callback, true);
     this._configuration = RpcClientConfiguration.Default.Clone();
     this._configuration.TransportManagerProvider = conf => this._clientTransportManager;
     this._configuration.Freeze();
     this._serverTransportManager = new MsgPack.Rpc.Server.Protocols.InProcServerTransportManager(this._server.Server as Server.RpcServer, mgr => new SingletonObjectPool <Server.Protocols.InProcServerTransport>(new Server.Protocols.InProcServerTransport(mgr)));
     this._clientTransportManager = new InProcClientTransportManager(new RpcClientConfiguration(), this._serverTransportManager);
 }
Exemple #2
0
			public InProcTestEnvironment( Func<string, int?, MessagePackObject[], MessagePackObject> callback )
			{
				this._endPoint = new IPEndPoint( IPAddress.Loopback, MsgPack.Rpc.Server.CallbackServer.PortNumber );
				this._server = MsgPack.Rpc.Server.CallbackServer.Create( callback, true );
				this._configuration = RpcClientConfiguration.Default.Clone();
				this._configuration.TransportManagerProvider = conf => this._clientTransportManager;
				this._configuration.Freeze();
				this._serverTransportManager = new MsgPack.Rpc.Server.Protocols.InProcServerTransportManager( this._server.Server as Server.RpcServer, mgr => new SingletonObjectPool<Server.Protocols.InProcServerTransport>( new Server.Protocols.InProcServerTransport( mgr ) ) );
				this._clientTransportManager = new InProcClientTransportManager( new RpcClientConfiguration(), this._serverTransportManager );
			}