public FtpProject(IProjectFactory factory, IServiceProvider serviceProvider, FtpConnection connection) : base(factory, serviceProvider) { this._connection = connection; this._rootItem = new FtpConnectionProjectItem(this); ((IServiceContainer) base.GetService(typeof(IServiceContainer))).AddService(typeof(IWebDocumentRunService), this); }
public FtpNetworkStream(FtpConnection owner, Socket socket, FileAccess access) : base(socket, access, true) { this._owner = owner; }
protected override void PerformTask() { try { this._connection.Open(); } catch (Exception exception) { this._connection = null; this._error = exception.Message; } base.PostResults(this._connection, 100, true); }
public ConnectionAsyncTask(string remoteHost, int port, string userName, string password) { this._connection = new FtpConnection(remoteHost, port, userName, password); }
private void OnConnectionComplete(object sender, AsyncTaskResultPostedEventArgs e) { this._gradientBand.Stop(); this._gradientBand.Visible = false; this._okButton.Enabled = true; this._connectionTask = null; this._connection = (FtpConnection) e.Data; if (this._connection != null) { this._httpUrl = this._httpUrlTextBox.Text.Trim(); if (this._httpUrl.EndsWith("/")) { this._httpUrl = this._httpUrl.Substring(0, this._httpUrl.Length - 1); } base.DialogResult = DialogResult.OK; base.Close(); } else { ((IMxUIService) this.GetService(typeof(IMxUIService))).ReportError("Could not connect to the specified FTP site.\r\nCheck the site address and user information before trying again.", this.Text, false); } }
private FtpProject CreateProject(FtpConnection connection, string httpRoot, string httpUrl) { FtpProject project = new FtpProject(this, this._serviceProvider, connection); project.HttpRoot = httpRoot; project.HttpUrl = httpUrl; return project; }
protected override void Dispose(bool disposing) { if (disposing) { IServiceContainer service = (IServiceContainer) base.GetService(typeof(IServiceContainer)); if (service != null) { service.RemoveService(typeof(IWebDocumentRunService)); } if (this._connection != null) { this._connection.Dispose(); this._connection = null; } this._rootItem = null; } base.Dispose(disposing); }