예제 #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)
            {
                IIrregularTimePoint timePointsCasted = item.As <IIrregularTimePoint>();

                if ((timePointsCasted != null))
                {
                    this._parent.TimePoints.Add(timePointsCasted);
                }
            }
예제 #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)
            {
                IIrregularTimePoint irregularTimePointItem = item.As <IIrregularTimePoint>();

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