public FtpProvider(IFtpServerConnection server, IProxySettings proxy = null) : this(server, proxy.ToWebProxy()) { }
public static FtpWebRequest Create(string ftpPath, FtpRequestType ftpRequestMethod, IFtpServerConnection ftpServerConnection, IWebProxy proxy) { if (ftpServerConnection == null) { throw new ArgumentNullException(nameof(ftpServerConnection), "отсутствуют параметры подключения к ftp"); } if (string.IsNullOrWhiteSpace(ftpServerConnection.Server)) { throw new ArgumentOutOfRangeException(nameof(ftpServerConnection), "в параметрах подключения к ftp серверу отсутствует адрес сервера"); } var request = Create(ftpPath, ftpRequestMethod, ftpServerConnection.Server, ftpServerConnection.User.ToCredentials(), ftpServerConnection.UsePassive, proxy); return(request); }
public FtpProvider(IFtpServerConnection server, IWebProxy proxy = null) : this(server.ThrowIfNull(ErrorMessage).Server, server.ThrowIfNull(ErrorMessage).User.ToCredentials(), proxy, server.ThrowIfNull(ErrorMessage).UsePassive) { }
public static FtpWebRequest Create(string ftpPath, FtpRequestType ftpRequestMethod, IFtpServerConnection ftpServerConnection, IProxySettings proxy) { return(Create(ftpPath, ftpRequestMethod, ftpServerConnection, proxy.ToWebProxy())); }