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

                if ((subLoadAreasCasted != null))
                {
                    this._parent.SubLoadAreas.Add(subLoadAreasCasted);
                }
            }
示例#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)
            {
                ISubLoadArea subLoadAreaItem = item.As <ISubLoadArea>();

                if (((subLoadAreaItem != null) &&
                     this._parent.SubLoadAreas.Remove(subLoadAreaItem)))
                {
                    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.SubLoadArea == null))
     {
         ISubLoadArea subLoadAreaCasted = item.As <ISubLoadArea>();
         if ((subLoadAreaCasted != null))
         {
             this._parent.SubLoadArea = subLoadAreaCasted;
             return;
         }
     }
 }
示例#4
0
            /// <summary>
            /// Adds the given element to the collection
            /// </summary>
            /// <param name="item">The item to add</param>
            public override void Add(IModelElement item)
            {
                IRegisteredLoad registeredLoadsCasted = item.As <IRegisteredLoad>();

                if ((registeredLoadsCasted != null))
                {
                    this._parent.RegisteredLoads.Add(registeredLoadsCasted);
                }
                if ((this._parent.SubLoadArea == null))
                {
                    ISubLoadArea subLoadAreaCasted = item.As <ISubLoadArea>();
                    if ((subLoadAreaCasted != null))
                    {
                        this._parent.SubLoadArea = subLoadAreaCasted;
                        return;
                    }
                }
            }