public FtpClient(FtpClientConfiguration configuration) { this.configuration = configuration; if (configuration.Host == null) { throw new ArgumentNullException(nameof(configuration.Host)); } }
public FtpClient(FtpClientConfiguration configuration) { this.Configuration = configuration; if (configuration.Host == null) { throw new ArgumentNullException(nameof(configuration.Host)); } dnsResolver = new DnsResolver(); }
public void Configure(FtpClientConfiguration configuration) { Configuration = configuration; if (configuration.Host == null) { throw new ArgumentNullException(nameof(configuration.Host)); } ControlStream = new FtpControlStream(Configuration, new DnsResolver()); Configuration.BaseDirectory = $"/{Configuration.BaseDirectory.TrimStart( '/' )}"; }
public void Configure(FtpClientConfiguration configuration) { Configuration = configuration; if (configuration.Host == null) { throw new ArgumentNullException(nameof(configuration.Host)); } if (Uri.IsWellFormedUriString(configuration.Host, UriKind.Absolute)) { configuration.Host = new Uri(configuration.Host).Host; } ControlStream = new FtpControlStream(Configuration, new DnsResolver()); Configuration.BaseDirectory = $"/{Configuration.BaseDirectory.TrimStart( '/' )}"; }
public FtpClient(FtpClientConfiguration configuration) { Configure(configuration); }