Пример #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)
            {
                ITupleLiteralPart partCasted = item.As <ITupleLiteralPart>();

                if ((partCasted != null))
                {
                    this._parent.Part.Add(partCasted);
                }
            }
Пример #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)
            {
                ITupleLiteralPart tupleLiteralPartItem = item.As <ITupleLiteralPart>();

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