public Response <HoldingsResult> DownloadHoldings(string portfolioID, int viewIndex)
 {
     if (this.IsLoggedIn)
     {
         HoldingsDownload dl = new HoldingsDownload();
         dl.Settings.Account     = this;
         dl.Settings.PortfolioID = portfolioID;
         return(dl.Download());
     }
     else
     {
         throw new NotSupportedException("The user is not logged in.");
     }
 }
 public void DownloadHoldingsAsync(string portfolioID, int viewIndex, object userArgs)
 {
     if (this.IsLoggedIn)
     {
         HoldingsDownload dl = new HoldingsDownload();
         dl.Settings.Account        = this;
         dl.Settings.PortfolioID    = portfolioID;
         dl.AsyncDownloadCompleted += this.HoldingsDownload_Completed;
         dl.DownloadAsync(userArgs);
     }
     else
     {
         throw new NotSupportedException("The user is not logged in.");
     }
 }