Automatak.Simulator.DNP3.Components.ChannelDialog.GetTCPClientFunctor C# (CSharp) Method

GetTCPClientFunctor() private method

private GetTCPClientFunctor ( TimeSpan min, TimeSpan max, bool useTLS ) : IChannel>.Func
min TimeSpan
max TimeSpan
useTLS bool
return IChannel>.Func
        private Func<IDNP3Manager, IChannel> GetTCPClientFunctor(TimeSpan min, TimeSpan max, bool useTLS)
        {
            var flags = logLevelControl1.Filters.Flags;
            var retry = new ChannelRetry(min, max);
            if (useTLS)
            {
                var config = this.clientTLSOptionsControl.Configuration;
                return (IDNP3Manager manager) =>
                    manager.AddTLSClient(this.textBoxID.Text, flags, retry, textBoxHost.Text, Decimal.ToUInt16(numericUpDownPort.Value), config);
            }
            else
            {
                return (IDNP3Manager manager) => manager.AddTCPClient(this.textBoxID.Text, flags, retry, textBoxHost.Text, Decimal.ToUInt16(numericUpDownPort.Value));
            }
        }