}//getItemByName #endregion Locating Items #region Collection Methods public virtual void AddIfNotExists(ICategoryItem cNewItem) { // Adds item to collection only if it doesn't already exist if (!isItemExistsInCollection(cNewItem.ItemName)) { Add(cNewItem); } }//AddIfNotExists
private Color m_clrSecColor; // Security display color #endregion Data members #region Constructors, Initialization & Destructor public cSecProperties(IErrorHandler cErrors, IPortfolioBL cPort) { m_objPortfolio = cPort; m_objErrorHandler = cErrors; m_catSector = new cCategoryItem(enumCatType.Sector, "", -1, m_objErrorHandler, cPort); //m_catCurrency = new cCategoryItem(enumCatType.Currency, "", -1, m_objErrorHandler); m_catMarket = new cCategoryItem(enumCatType.StockMarket, "", -1, m_objErrorHandler, cPort); m_catSecType = new cCategoryItem(enumCatType.SecurityType, "", -1, m_objErrorHandler, cPort); }//constructor
}//loadSecuritiesFromCollection public ICategoryItem getCatItemByID(enumCatType eType, int iId, ICategoryCollection cCollection) { // Retrieves category Item From given category ID ICategoryItem cCurrItem = cCollection.getItemByID(iId); if (cCurrItem == null) // new item { // Doesn't exist - create new cCurrItem = new cCategoryItem(eType, m_objCatHandler.getCategoryCol(eType).getCategoryVal(iId), iId, m_objErrorHandler, m_objPortfolio); cCollection.Add(cCurrItem); } return(cCurrItem); }//getCatItemByID
}//AddIfNotExists public virtual void Add(ICategoryItem NewItem) { // Adds Item to collection this.List.Add(NewItem); }//Add
public SubPage(IWebDriver driver, ICategoryItem categoryItem) : base(driver) { _driver = driver; _categoryItem = categoryItem; }