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

GetTCPServerFunctor() private method

private GetTCPServerFunctor ( TimeSpan min, TimeSpan max, bool useTLS ) : IChannel>.Func
min TimeSpan
max TimeSpan
useTLS bool
return IChannel>.Func
        private Func<IDNP3Manager, IChannel> GetTCPServerFunctor(TimeSpan min, TimeSpan max, bool useTLS)
        {
            var flags = logLevelControl1.Filters.Flags;
            var retry = new ChannelRetry(min, max);
            if (useTLS)
            {
                var config = this.serverTLSOptionsControl.Configuration;
                return (IDNP3Manager manager) =>
                    manager.AddTLSServer(this.textBoxID.Text, flags, retry, textBoxServerHost.Text, Decimal.ToUInt16(numericUpDownServerPort.Value), config);
            }
            else
            {
                return (IDNP3Manager manager) =>
                    manager.AddTCPServer(this.textBoxID.Text, flags, retry, textBoxServerHost.Text, Decimal.ToUInt16(numericUpDownServerPort.Value));
            }
        }