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)
 {
     if ((this._parent.MountingPoint == null))
     {
         IMountingPoint mountingPointCasted = item.As <IMountingPoint>();
         if ((mountingPointCasted != null))
         {
             this._parent.MountingPoint = mountingPointCasted;
             return;
         }
     }
 }
Example #2
0
            /// <summary>
            /// Adds the given element to the collection
            /// </summary>
            /// <param name="item">The item to add</param>
            public override void Add(IModelElement item)
            {
                IStructureInfo structureInfosCasted = item.As <IStructureInfo>();

                if ((structureInfosCasted != null))
                {
                    this._parent.StructureInfos.Add(structureInfosCasted);
                }
                IMountingPoint mountingPointsCasted = item.As <IMountingPoint>();

                if ((mountingPointsCasted != null))
                {
                    this._parent.MountingPoints.Add(mountingPointsCasted);
                }
            }
Example #3
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)
            {
                IStructureInfo structureInfoItem = item.As <IStructureInfo>();

                if (((structureInfoItem != null) &&
                     this._parent.StructureInfos.Remove(structureInfoItem)))
                {
                    return(true);
                }
                IMountingPoint mountingPointItem = item.As <IMountingPoint>();

                if (((mountingPointItem != null) &&
                     this._parent.MountingPoints.Remove(mountingPointItem)))
                {
                    return(true);
                }
                return(false);
            }
Example #4
0
 /// <summary>
 /// Creates a new observable property access proxy
 /// </summary>
 /// <param name="modelElement">The model instance element for which to create the property access proxy</param>
 public PhaseCodeProxy(IMountingPoint modelElement) :
     base(modelElement, "phaseCode")
 {
 }