public void FixtureSetUp() { // // TODO: Add constructor logic here // if (!_inited) { ServiceSettings.InitService("UnitTest-Common"); RpcProxyFactory.RegisterClientChannel(new RpcHttpClientChannel()); RpcProxyFactory.RegisterClientChannel(new RpcPipeClientChannel()); RpcProxyFactory.RegisterClientChannel(RpcInprocClientChannel.Instance); RpcProxyFactory.RegisterClientChannel(new RpcTcpClientChannel()); RpcServiceManager.RegisterServerChannel(new RpcHttpServerChannel(8899)); RpcServiceManager.RegisterServerChannel(new RpcPipeServerChannel("UnitTest", 10)); RpcServiceManager.RegisterServerChannel(RpcInprocServerChannel.Instance); RpcServiceManager.RegisterServerChannel(new RpcTcpServerChannel(3900)); RpcServiceManager.Start(); RpcServiceManager.RegisterService <IRpcTestService>(new RpcTestService()); AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); _inited = true; } CurrentTestUrl = RpcTcpUrl; CurrentFailedUrl = "tcp://127.0.0.1:49494"; }
public static void Initialize() { RpcServiceManager.RegisterRawService(_instance); }