/// <summary> /// append a new symbol path element to the beginning of the symbol path represented by 'this'. /// returns the 'this' pointer /// </summary> public SymbolPath Add(SymbolPathElement elem) { if (elem != null && !m_elements.Contains(elem)) { m_elements.Add(elem); } return(this); }
/// <summary> /// insert a new symbol path element to the beginning of the symbol path represented by 'this'. /// returns the 'this' pointer /// </summary> public SymbolPath Insert(SymbolPathElement elem) { if (elem != null) { var existing = m_elements.IndexOf(elem); if (existing >= 0) { m_elements.RemoveAt(existing); } m_elements.Insert(0, elem); } return(this); }