Example #1
0
        public int NumberOfSharesOfStockInPortfolio(string inPortfolioID, string inStockName)
        {
            Portfolio portfolio   = this.getPortfolioFromStockExchange(inPortfolioID);
            string    unifiedName = unifyName(inStockName);

            return(portfolio.NumberOfSharesOfStockInPortfolio(unifiedName));
        }
Example #2
0
        public void RemoveStockFromPortfolio(string inPortfolioID, string inStockName)
        {
            Portfolio portfolio   = this.getPortfolioFromStockExchange(inPortfolioID);
            string    unifiedName = unifyName(inStockName);

            int stocksToRemove = portfolio.NumberOfSharesOfStockInPortfolio(unifiedName);

            portfolio.RemoveStockFromPortfolio(unifiedName);
            this.soldStocks [unifiedName] += stocksToRemove;
        }