/// <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.TransmissionRightOfWay == null)) { ITransmissionRightOfWay transmissionRightOfWayCasted = item.As <ITransmissionRightOfWay>(); if ((transmissionRightOfWayCasted != null)) { this._parent.TransmissionRightOfWay = transmissionRightOfWayCasted; return; } } IFlowgate flowgatesCasted = item.As <IFlowgate>(); if ((flowgatesCasted != null)) { this._parent.Flowgates.Add(flowgatesCasted); } if ((this._parent.Region == null)) { ISubGeographicalRegion regionCasted = item.As <ISubGeographicalRegion>(); if ((regionCasted != null)) { this._parent.Region = regionCasted; 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.EnergyPriceCurve == null)) { IEnergyPriceCurve energyPriceCurveCasted = item.As <IEnergyPriceCurve>(); if ((energyPriceCurveCasted != null)) { this._parent.EnergyPriceCurve = energyPriceCurveCasted; return; } } IPnode pnodesCasted = item.As <IPnode>(); if ((pnodesCasted != null)) { this._parent.Pnodes.Add(pnodesCasted); } if ((this._parent.Flowgate == null)) { IFlowgate flowgateCasted = item.As <IFlowgate>(); if ((flowgateCasted != null)) { this._parent.Flowgate = flowgateCasted; return; } } }
/// <summary> /// Adds the given element to the collection /// </summary> /// <param name="item">The item to add</param> public override void Add(IModelElement item) { IFlowgate flowgateCasted = item.As <IFlowgate>(); if ((flowgateCasted != null)) { this._parent.Flowgate.Add(flowgateCasted); } }
/// <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) { IFlowgate flowgateItem = item.As <IFlowgate>(); if (((flowgateItem != null) && this._parent.Flowgate.Remove(flowgateItem))) { 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> /// 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) { IServicePoint servicePointItem = item.As <IServicePoint>(); if (((servicePointItem != null) && this._parent.ServicePoint.Remove(servicePointItem))) { return(true); } IAncillaryService ancillaryServiceItem = item.As <IAncillaryService>(); if (((ancillaryServiceItem != null) && this._parent.AncillaryServices.Remove(ancillaryServiceItem))) { return(true); } ILossProfile lossProfileItem = item.As <ILossProfile>(); if (((lossProfileItem != null) && this._parent.For.Remove(lossProfileItem))) { return(true); } ITransmissionService transmissionServiceItem = item.As <ITransmissionService>(); if (((transmissionServiceItem != null) && this._parent.OfferedBy.Remove(transmissionServiceItem))) { return(true); } IFlowgate flowgateItem = item.As <IFlowgate>(); if (((flowgateItem != null) && this._parent.Flowgate.Remove(flowgateItem))) { return(true); } IServiceReservation serviceReservationItem = item.As <IServiceReservation>(); if (((serviceReservationItem != null) && this._parent.SoldBy.Remove(serviceReservationItem))) { return(true); } ITransmissionProduct transmissionProductItem = item.As <ITransmissionProduct>(); if (((transmissionProductItem != null) && this._parent.TransmissionProducts.Remove(transmissionProductItem))) { 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) { IServicePoint servicePointCasted = item.As <IServicePoint>(); if ((servicePointCasted != null)) { this._parent.ServicePoint.Add(servicePointCasted); } IAncillaryService ancillaryServicesCasted = item.As <IAncillaryService>(); if ((ancillaryServicesCasted != null)) { this._parent.AncillaryServices.Add(ancillaryServicesCasted); } ILossProfile forCasted = item.As <ILossProfile>(); if ((forCasted != null)) { this._parent.For.Add(forCasted); } ITransmissionService offeredByCasted = item.As <ITransmissionService>(); if ((offeredByCasted != null)) { this._parent.OfferedBy.Add(offeredByCasted); } IFlowgate flowgateCasted = item.As <IFlowgate>(); if ((flowgateCasted != null)) { this._parent.Flowgate.Add(flowgateCasted); } IServiceReservation soldByCasted = item.As <IServiceReservation>(); if ((soldByCasted != null)) { this._parent.SoldBy.Add(soldByCasted); } ITransmissionProduct transmissionProductsCasted = item.As <ITransmissionProduct>(); if ((transmissionProductsCasted != null)) { this._parent.TransmissionProducts.Add(transmissionProductsCasted); } }
/// <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.Season == null)) { ISeason seasonCasted = item.As <ISeason>(); if ((seasonCasted != null)) { this._parent.Season = seasonCasted; return; } } IFlowgate flowgateCasted = item.As <IFlowgate>(); if ((flowgateCasted != null)) { this._parent.Flowgate.Add(flowgateCasted); } }
/// <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) { if ((this._parent.TransmissionRightOfWay == item)) { this._parent.TransmissionRightOfWay = null; return(true); } IFlowgate flowgateItem = item.As <IFlowgate>(); if (((flowgateItem != null) && this._parent.Flowgates.Remove(flowgateItem))) { return(true); } if ((this._parent.Region == item)) { this._parent.Region = null; 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) { IFlowgate flowgateItem = item.As <IFlowgate>(); if (((flowgateItem != null) && this._parent.Flowgates.Remove(flowgateItem))) { return(true); } if ((this._parent.HeatExchanger == item)) { this._parent.HeatExchanger = null; return(true); } ITransformerWinding transformerWindingItem = item.As <ITransformerWinding>(); if (((transformerWindingItem != null) && this._parent.TransformerWindings.Remove(transformerWindingItem))) { 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) { IFlowgate flowgatesCasted = item.As <IFlowgate>(); if ((flowgatesCasted != null)) { this._parent.Flowgates.Add(flowgatesCasted); } if ((this._parent.HeatExchanger == null)) { IHeatExchanger heatExchangerCasted = item.As <IHeatExchanger>(); if ((heatExchangerCasted != null)) { this._parent.HeatExchanger = heatExchangerCasted; return; } } ITransformerWinding transformerWindingsCasted = item.As <ITransformerWinding>(); if ((transformerWindingsCasted != null)) { this._parent.TransformerWindings.Add(transformerWindingsCasted); } }
/// <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.Season == null)) { ISeason seasonCasted = item.As <ISeason>(); if ((seasonCasted != null)) { this._parent.Season = seasonCasted; return; } } if ((this._parent.Measurement == null)) { IMeasurement measurementCasted = item.As <IMeasurement>(); if ((measurementCasted != null)) { this._parent.Measurement = measurementCasted; return; } } IErpOrganisation organisationsCasted = item.As <IErpOrganisation>(); if ((organisationsCasted != null)) { this._parent.Organisations.Add(organisationsCasted); } if ((this._parent.Flowgate == null)) { IFlowgate flowgateCasted = item.As <IFlowgate>(); if ((flowgateCasted != null)) { this._parent.Flowgate = flowgateCasted; return; } } }