Example #1
0
            /// <summary>
            /// Adds the given element to the collection
            /// </summary>
            /// <param name="item">The item to add</param>
            public override void Add(IModelElement item)
            {
                ISect2 sections_2Casted = item.As <ISect2>();

                if ((sections_2Casted != null))
                {
                    this._parent.Sections_2.Add(sections_2Casted);
                }
            }
Example #2
0
            /// <summary>
            /// Removes the given item from the collection
            /// </summary>
            /// <returns>True, if the item was removed, otherwise False</returns>
            /// <param name="item">The item that should be removed</param>
            public override bool Remove(IModelElement item)
            {
                ISect2 sect2Item = item.As <ISect2>();

                if (((sect2Item != null) &&
                     this._parent.Sections_2.Remove(sect2Item)))
                {
                    return(true);
                }
                return(false);
            }