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;
}