Beispiel #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)
            {
                ISect1 sections_1Casted = item.As <ISect1>();

                if ((sections_1Casted != null))
                {
                    this._parent.Sections_1.Add(sections_1Casted);
                }
            }
Beispiel #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)
            {
                ISect1 sect1Item = item.As <ISect1>();

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