/// <summary> /// Adds the given element to the collection /// </summary> /// <param name="item">The item to add</param> public override void Add(IModelElement item) { ITieLine tieLinesCasted = item.As <ITieLine>(); if ((tieLinesCasted != null)) { this._parent.TieLines.Add(tieLinesCasted); } }
/// <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) { ITieLine tieLineItem = item.As <ITieLine>(); if (((tieLineItem != null) && this._parent.TieLines.Remove(tieLineItem))) { return(true); } return(false); }
/// <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) { ITieLine tieLineItem = item.As <ITieLine>(); if (((tieLineItem != null) && this._parent.SideA_TieLines.Remove(tieLineItem))) { return(true); } IGeneratingUnit generatingUnitItem = item.As <IGeneratingUnit>(); if (((generatingUnitItem != null) && this._parent.GeneratingUnits.Remove(generatingUnitItem))) { return(true); } IEnergyTransaction energyTransactionItem = item.As <IEnergyTransaction>(); if (((energyTransactionItem != null) && this._parent.Export_EnergyTransactions.Remove(energyTransactionItem))) { return(true); } if (((energyTransactionItem != null) && this._parent.Import_EnergyTransactions.Remove(energyTransactionItem))) { return(true); } if ((this._parent.HostControlArea == item)) { this._parent.HostControlArea = null; return(true); } IServicePoint servicePointItem = item.As <IServicePoint>(); if (((servicePointItem != null) && this._parent.PartOf.Remove(servicePointItem))) { return(true); } IFlowgate flowgateItem = item.As <IFlowgate>(); if (((flowgateItem != null) && this._parent.Flowgate.Remove(flowgateItem))) { return(true); } if (((tieLineItem != null) && this._parent.SideB_TieLines.Remove(tieLineItem))) { 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) { ITieLine sideA_TieLinesCasted = item.As <ITieLine>(); if ((sideA_TieLinesCasted != null)) { this._parent.SideA_TieLines.Add(sideA_TieLinesCasted); } IGeneratingUnit generatingUnitsCasted = item.As <IGeneratingUnit>(); if ((generatingUnitsCasted != null)) { this._parent.GeneratingUnits.Add(generatingUnitsCasted); } IEnergyTransaction export_EnergyTransactionsCasted = item.As <IEnergyTransaction>(); if ((export_EnergyTransactionsCasted != null)) { this._parent.Export_EnergyTransactions.Add(export_EnergyTransactionsCasted); } IEnergyTransaction import_EnergyTransactionsCasted = item.As <IEnergyTransaction>(); if ((import_EnergyTransactionsCasted != null)) { this._parent.Import_EnergyTransactions.Add(import_EnergyTransactionsCasted); } if ((this._parent.HostControlArea == null)) { IHostControlArea hostControlAreaCasted = item.As <IHostControlArea>(); if ((hostControlAreaCasted != null)) { this._parent.HostControlArea = hostControlAreaCasted; return; } } IServicePoint partOfCasted = item.As <IServicePoint>(); if ((partOfCasted != null)) { this._parent.PartOf.Add(partOfCasted); } IFlowgate flowgateCasted = item.As <IFlowgate>(); if ((flowgateCasted != null)) { this._parent.Flowgate.Add(flowgateCasted); } ITieLine sideB_TieLinesCasted = item.As <ITieLine>(); if ((sideB_TieLinesCasted != null)) { this._parent.SideB_TieLines.Add(sideB_TieLinesCasted); } }
/// <summary> /// Adds the given element to the collection /// </summary> /// <param name="item">The item to add</param> public override void Add(IModelElement item) { ITieLine tieLinesCasted = item.As <ITieLine>(); if ((tieLinesCasted != null)) { this._parent.TieLines.Add(tieLinesCasted); } IServicePoint servicePointCasted = item.As <IServicePoint>(); if ((servicePointCasted != null)) { this._parent.ServicePoint.Add(servicePointCasted); } }
/// <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) { IAncillaryService ancillaryServiceItem = item.As <IAncillaryService>(); if (((ancillaryServiceItem != null) && this._parent.AncillaryService.Remove(ancillaryServiceItem))) { return(true); } ITieLine tieLineItem = item.As <ITieLine>(); if (((tieLineItem != null) && this._parent.TieLines.Remove(tieLineItem))) { return(true); } if ((this._parent.ControlledBy == item)) { this._parent.ControlledBy = null; 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) { IAncillaryService ancillaryServiceCasted = item.As <IAncillaryService>(); if ((ancillaryServiceCasted != null)) { this._parent.AncillaryService.Add(ancillaryServiceCasted); } ITieLine tieLinesCasted = item.As <ITieLine>(); if ((tieLinesCasted != null)) { this._parent.TieLines.Add(tieLinesCasted); } if ((this._parent.ControlledBy == null)) { IHostControlArea controlledByCasted = item.As <IHostControlArea>(); if ((controlledByCasted != null)) { this._parent.ControlledBy = controlledByCasted; return; } } }