public void LogOutAsync(object userArgs) { if (this.IsLoggedIn) { Html2XmlDownload dl = new Html2XmlDownload(); dl.Settings.Account = this; dl.Settings.DownloadStream = false; dl.Settings.Url = "http://login.yahoo.com/config/login?logout=1&.direct=2&.done=&.src=&.intl=us&.lang=en-US"; dl.AsyncDownloadCompleted += this.LogOutAsync_Completed; dl.DownloadAsync(userArgs); } }
public void AddPortfolioItemAsync(string portfolioID, string itemID, object userArgs) { Html2XmlDownload html = new Html2XmlDownload(); html.Settings.Account = this; html.Settings.Url = string.Format("http://finance.yahoo.com/portfolio/add_symbols?portfolio_id={0}&portfolio_view_id=v1"es={1}", portfolioID, itemID); html.AsyncDownloadCompleted += this.AddPortfolioItem_Completed; html.DownloadAsync(new AddPfItemAsyncArgs(userArgs) { PortfolioID = portfolioID }); }
public void UploadAsync(WebFormDownloadSettings settings, object userArgs) { AsyncArgs args = new AsyncArgs(userArgs) { Settings = settings }; if (settings.Account.Crumb == string.Empty) { Html2XmlDownload html = new Html2XmlDownload(); html.Settings.Account = settings.Account; html.Settings.Url = settings.Url; html.AsyncDownloadCompleted += this.html_DownloadAsyncCompleted; html.DownloadAsync(args); } else { this.UploadAsync2(args); } }