CreateClientChannel() public static méthode

public static CreateClientChannel ( string name, ChannelType type, IPEndPoint endPoint, XunitOutputLogger outputSource ) : Client.IChannel
name string
type ChannelType
endPoint System.Net.IPEndPoint
outputSource XunitOutputLogger
Résultat Client.IChannel
        private async Task <Client.IChannel> CreateSecondaryClientChannelAsync(string address, bool connected = true)
        {
            var channel = ChannelHelper.CreateClientChannel("2", address, _outputSource);

            if (connected)
            {
                await channel.ConnectAsync();
            }

            return(channel);
        }
        private async Task <Client.IChannel> CreatePrimaryClientChannelAsync(ChannelType type, bool connected = true)
        {
            var channel = ChannelHelper.CreateClientChannel("1", type, _testEndPoint, _outputSource);

            channel.ChannelRouter = (_, address) =>
            {
                try
                {
                    return(CreateSecondaryClientChannelAsync(address, true).Result);
                }
                catch (Exception)
                {
                    return(null);
                }
            };

            if (connected)
            {
                await channel.ConnectAsync();
            }

            return(channel);
        }