/// <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.GenerationProvider == item)) { this._parent.GenerationProvider = null; return(true); } if ((this._parent.TitleHeldBy_Marketer == item)) { this._parent.TitleHeldBy_Marketer = null; return(true); } IEnergyTransaction energyTransactionItem = item.As <IEnergyTransaction>(); if (((energyTransactionItem != null) && this._parent.EnergyTransactions.Remove(energyTransactionItem))) { return(true); } IMarketer marketerItem = item.As <IMarketer>(); if (((marketerItem != null) && this._parent.ResoldBy_Marketers.Remove(marketerItem))) { return(true); } IServicePoint servicePointItem = item.As <IServicePoint>(); if (((servicePointItem != null) && this._parent.ServicePoint.Remove(servicePointItem))) { 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) { if ((this._parent.EnergyTransaction == null)) { IEnergyTransaction energyTransactionCasted = item.As <IEnergyTransaction>(); if ((energyTransactionCasted != null)) { this._parent.EnergyTransaction = energyTransactionCasted; return; } } }
/// <summary> /// Adds the given element to the collection /// </summary> /// <param name="item">The item to add</param> public override void Add(IModelElement item) { IFTR fTRsCasted = item.As <IFTR>(); if ((fTRsCasted != null)) { this._parent.FTRs.Add(fTRsCasted); } IEnergyTransaction energyTransactionsCasted = item.As <IEnergyTransaction>(); if ((energyTransactionsCasted != null)) { this._parent.EnergyTransactions.Add(energyTransactionsCasted); } }
/// <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) { IFTR fTRItem = item.As <IFTR>(); if (((fTRItem != null) && this._parent.FTRs.Remove(fTRItem))) { return(true); } IEnergyTransaction energyTransactionItem = item.As <IEnergyTransaction>(); if (((energyTransactionItem != null) && this._parent.EnergyTransactions.Remove(energyTransactionItem))) { 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.HasLoss_ == null)) { ITransmissionProvider hasLoss_Casted = item.As <ITransmissionProvider>(); if ((hasLoss_Casted != null)) { this._parent.HasLoss_ = hasLoss_Casted; return; } } if ((this._parent.EnergyTransaction == null)) { IEnergyTransaction energyTransactionCasted = item.As <IEnergyTransaction>(); if ((energyTransactionCasted != null)) { this._parent.EnergyTransaction = energyTransactionCasted; 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.GenerationProvider == null)) { IGenerationProvider generationProviderCasted = item.As <IGenerationProvider>(); if ((generationProviderCasted != null)) { this._parent.GenerationProvider = generationProviderCasted; return; } } if ((this._parent.TitleHeldBy_Marketer == null)) { IMarketer titleHeldBy_MarketerCasted = item.As <IMarketer>(); if ((titleHeldBy_MarketerCasted != null)) { this._parent.TitleHeldBy_Marketer = titleHeldBy_MarketerCasted; return; } } IEnergyTransaction energyTransactionsCasted = item.As <IEnergyTransaction>(); if ((energyTransactionsCasted != null)) { this._parent.EnergyTransactions.Add(energyTransactionsCasted); } IMarketer resoldBy_MarketersCasted = item.As <IMarketer>(); if ((resoldBy_MarketersCasted != null)) { this._parent.ResoldBy_Marketers.Add(resoldBy_MarketersCasted); } IServicePoint servicePointCasted = item.As <IServicePoint>(); if ((servicePointCasted != null)) { this._parent.ServicePoint.Add(servicePointCasted); } }