public FtpConnection(FtpConnectionInfo info) { if (info == null) { throw new ArgumentNullException("info"); } if (!info.IsValid) { throw new ArgumentException("info is not valid"); } this._userName = info.UserName; this._password = info.Password; this._remoteHostName = info.RemoteHostName; this._remotePort = info.RemotePort; }
object IProjectFactory.SaveProject(Project project) { FtpProject project2 = project as FtpProject; if (project2 == null) { throw new ArgumentException("Unexpected project type"); } FtpConnectionInfo info = new FtpConnectionInfo(); info.RemoteHostName = project2.Connection.RemoteHostName; info.RemotePort = project2.Connection.RemotePort; info.UserName = project2.Connection.UserName; info.Password = project2.Connection.Password; info.HttpRoot = project2.HttpRoot; info.HttpUrl = project2.HttpUrl; return info; }