/// <summary> /// Class initialize /// </summary> public ClientServerTest() { // Configure IP and port IPAddress localhost = IPAddress.Loopback; const int port = 8000; // Start server m_RemoteServiceContainer = new RemoteServiceContainer(); m_RemoteServiceContainer.RegisterService(typeof(IMyCustomService), new MyCustomService()); m_RemoteServiceContainer.Open(localhost, port); // Get service proxy in client side var servicesChannel = new ServiceChannel(localhost, port); m_ProxyTarget = servicesChannel.GetRemoteService <IMyCustomService>(); // Initialize the actual object locally. The tests may use this object as 'expected' value during assertion m_LocalTarget = new MyCustomService(); }