public void EditPortfolio(string portfolioID, string name, CurrencyInfo currency, bool symbolSorting, bool symbolCollapsing, IEnumerable <YID> items = null, IEnumerable <YIndexID> indices = null)
 {
     if (this.IsLoggedIn)
     {
         WebFormUpload upl = new WebFormUpload();
         upl.Upload(this.GetEditPortfolioDownloadSettings(portfolioID, name, currency, symbolSorting, symbolCollapsing, items, indices));
     }
     else
     {
         throw new NotSupportedException("The user is not logged in.");
     }
 }
 public void EditHoldings(string portfolioID, Holding[] holdings)
 {
     if (this.IsLoggedIn)
     {
         WebFormUpload upl = new WebFormUpload();
         upl.Upload(this.GetEditHoldingsDownloadSettings(portfolioID, holdings));
     }
     else
     {
         throw new NotSupportedException("The user is not logged in.");
     }
 }
 public void DeletePortfolioItem(string portfolioID, string itemID, int idIndex)
 {
     if (this.IsLoggedIn)
     {
         WebFormUpload upl = new WebFormUpload();
         upl.Upload(this.GetDeletePortfolioItemDownloadSettings(portfolioID, itemID, idIndex));
     }
     else
     {
         throw new NotSupportedException("The user is not logged in.");
     }
 }
 public Response <Portfolio> CreatePortfolio(string name, CurrencyInfo currency, bool symbolSorting, bool symbolCollapsing, IEnumerable <YID> items, IEnumerable <YIndexID> indices)
 {
     if (this.IsLoggedIn)
     {
         WebFormUpload             upl  = new WebFormUpload();
         Response <XParseDocument> resp = upl.Upload(this.GetCreatePortfolioDownloadSettings(name, currency, symbolSorting, symbolCollapsing, items, indices));
         return(((DefaultResponse <XParseDocument>)resp).CreateNew(new PortfolioDownload().ConvertHtmlDoc(resp.Result)));
     }
     else
     {
         throw new NotSupportedException("The user is not logged in.");
     }
 }
 public Response <PortfolioInfoResult> DeletePortfolio(string portfolioID)
 {
     if (this.IsLoggedIn)
     {
         WebFormUpload upl = new WebFormUpload();
         DefaultResponse <XDocument> resp = (DefaultResponse <XDocument>)upl.Upload(this.GetDeletePortfolioDownloadSettings(portfolioID));
         return(resp.CreateNew(new PortfolioInfoDownload().ConvertHtml(resp.Result)));
     }
     else
     {
         throw new NotSupportedException("The user is not logged in.");
     }
 }
 public bool LogIn(System.Net.NetworkCredential user)
 {
     if (!this.IsLoggedIn)
     {
         if (user == null)
         {
             throw new ArgumentNullException("User credential is null.");
         }
         mCookies = new CookieContainer();
         WebFormUpload upl = new WebFormUpload();
         upl.Upload(this.GetLoginDownloadSettings(user));
         if (!this.IsLoggedIn)
         {
             mCookies = null;
         }
     }
     return(this.IsLoggedIn);
 }