private void ConnectLegacy(IHelloWorldWcfServiceCallback netTcpCallback, string host, string clientVersion)
        {
            ClientConfig netTcpClientConfig = new ClientConfig
            {
                BindingType   = ServiceBindingType.NetTcp,
                Endpoint      = NetTcpEndpointName,
                Host          = host,
                Port          = _hogController.NetTcpPort,
                ClientVersion = "4.2",
                CheckVersion  = true
            };

            ClientConfig basicHttpClientConfig = new ClientConfig
            {
                BindingType   = ServiceBindingType.BasicHttp,
                Endpoint      = BasicHttpEndpointName,
                Host          = host,
                Port          = _hogController.HttpPort,
                ClientVersion = clientVersion,
                CheckVersion  = true
            };

            _clientFactory.Create <HelloWorldWcfServiceClientBase, IHelloWorldWcfService>(netTcpClientConfig, netTcpCallback, NetTcpCallback);
            _clientFactory.Create <SimpleHelloWorldWcfServiceClient, ISimpleHelloWorldWcfService>(basicHttpClientConfig, BasicHttpCallback);
        }
        private void Connect(ConnectionMode mode, IHelloWorldWcfServiceCallback netTcpCallback, string clientVersion = SimpleHelloWorldWcfService.ServerVersion)
        {
            switch (mode)
            {
            case ConnectionMode.New:
                _clientFactory.Create <HelloWorldWcfServiceClient, IHelloWorldWcfService>("4.2", NetTcpCallback);
                _clientFactory.Create <SimpleHelloWorldWcfServiceClient, ISimpleHelloWorldWcfService>(clientVersion, BasicHttpCallback);
                break;

            case ConnectionMode.Legacy:
                ConnectLegacy(netTcpCallback, null, clientVersion);
                break;

            case ConnectionMode.LegacyWithHost:
                ConnectLegacy(netTcpCallback, "localHost", clientVersion);
                break;

            default:
                Assert.Fail("Unknonw connection mode '{0}'", mode);
                break;
            }
        }