/// <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); } }
/// <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); }
/// <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; } } }
/// <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); } }