Пример #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)
            {
                IThermalGeneratingUnit thermalGeneratingUnitsCasted = item.As <IThermalGeneratingUnit>();

                if ((thermalGeneratingUnitsCasted != null))
                {
                    this._parent.ThermalGeneratingUnits.Add(thermalGeneratingUnitsCasted);
                }
            }
Пример #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)
            {
                IThermalGeneratingUnit thermalGeneratingUnitItem = item.As <IThermalGeneratingUnit>();

                if (((thermalGeneratingUnitItem != null) &&
                     this._parent.ThermalGeneratingUnits.Remove(thermalGeneratingUnitItem)))
                {
                    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.ThermalGeneratingUnit == null))
     {
         IThermalGeneratingUnit thermalGeneratingUnitCasted = item.As <IThermalGeneratingUnit>();
         if ((thermalGeneratingUnitCasted != null))
         {
             this._parent.ThermalGeneratingUnit = thermalGeneratingUnitCasted;
             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)
            {
                if ((this._parent.SteamSendoutSchedule == null))
                {
                    ISteamSendoutSchedule steamSendoutScheduleCasted = item.As <ISteamSendoutSchedule>();
                    if ((steamSendoutScheduleCasted != null))
                    {
                        this._parent.SteamSendoutSchedule = steamSendoutScheduleCasted;
                        return;
                    }
                }
                IThermalGeneratingUnit thermalGeneratingUnitsCasted = item.As <IThermalGeneratingUnit>();

                if ((thermalGeneratingUnitsCasted != null))
                {
                    this._parent.ThermalGeneratingUnits.Add(thermalGeneratingUnitsCasted);
                }
            }