示例#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)
            {
                IContainer_MM06 connectedContainersCasted = item.As <IContainer_MM06>();

                if ((connectedContainersCasted != null))
                {
                    this._parent.ConnectedContainers.Add(connectedContainersCasted);
                }
            }
示例#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)
            {
                IContainer_MM06 container_MM06Item = item.As <IContainer_MM06>();

                if (((container_MM06Item != null) &&
                     this._parent.ConnectedContainers.Remove(container_MM06Item)))
                {
                    return(true);
                }
                return(false);
            }
示例#3
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.Assembly == null))
     {
         IAssemblyContext assemblyCasted = item.As <IAssemblyContext>();
         if ((assemblyCasted != null))
         {
             this._parent.Assembly = assemblyCasted;
             return;
         }
     }
     if ((this._parent.Container == null))
     {
         IContainer_MM06 containerCasted = item.As <IContainer_MM06>();
         if ((containerCasted != null))
         {
             this._parent.Container = containerCasted;
             return;
         }
     }
 }