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)
            {
                IStringMeasurementValue stringMeasurementValuesCasted = item.As <IStringMeasurementValue>();

                if ((stringMeasurementValuesCasted != null))
                {
                    this._parent.StringMeasurementValues.Add(stringMeasurementValuesCasted);
                }
            }
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)
            {
                IStringMeasurementValue stringMeasurementValueItem = item.As <IStringMeasurementValue>();

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