Esempio n. 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)
            {
                ICombustionTurbine combustionTurbinesCasted = item.As <ICombustionTurbine>();

                if ((combustionTurbinesCasted != null))
                {
                    this._parent.CombustionTurbines.Add(combustionTurbinesCasted);
                }
            }
Esempio n. 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)
            {
                ICombustionTurbine combustionTurbineItem = item.As <ICombustionTurbine>();

                if (((combustionTurbineItem != null) &&
                     this._parent.CombustionTurbines.Remove(combustionTurbineItem)))
                {
                    return(true);
                }
                return(false);
            }
Esempio n. 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.CombustionTurbine == null))
     {
         ICombustionTurbine combustionTurbineCasted = item.As <ICombustionTurbine>();
         if ((combustionTurbineCasted != null))
         {
             this._parent.CombustionTurbine = combustionTurbineCasted;
             return;
         }
     }
 }