Esempio n. 1
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)
            {
                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);
            }
Esempio n. 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)
            {
                IServicePoint servicePointItem = item.As <IServicePoint>();

                if (((servicePointItem != null) &&
                     this._parent.ServicePoint.Remove(servicePointItem)))
                {
                    return(true);
                }
                IGeneratingUnit generatingUnitItem = item.As <IGeneratingUnit>();

                if (((generatingUnitItem != null) &&
                     this._parent.GeneratingUnits.Remove(generatingUnitItem)))
                {
                    return(true);
                }
                IEnergyProduct energyProductItem = item.As <IEnergyProduct>();

                if (((energyProductItem != null) &&
                     this._parent.EnergyProducts.Remove(energyProductItem)))
                {
                    return(true);
                }
                return(false);
            }
Esempio n. 3
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)
            {
                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);
            }
Esempio n. 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)
            {
                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);
                }
            }
Esempio n. 5
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)
            {
                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);
            }
Esempio n. 6
0
            /// <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);
                }
            }
Esempio n. 7
0
            /// <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);
                }
            }
Esempio n. 8
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)
            {
                ITieLine tieLineItem = item.As <ITieLine>();

                if (((tieLineItem != null) &&
                     this._parent.TieLines.Remove(tieLineItem)))
                {
                    return(true);
                }
                IServicePoint servicePointItem = item.As <IServicePoint>();

                if (((servicePointItem != null) &&
                     this._parent.ServicePoint.Remove(servicePointItem)))
                {
                    return(true);
                }
                return(false);
            }
Esempio n. 9
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.DeliveryPointFor == null))
                {
                    IServicePoint deliveryPointForCasted = item.As <IServicePoint>();
                    if ((deliveryPointForCasted != null))
                    {
                        this._parent.DeliveryPointFor = deliveryPointForCasted;
                        return;
                    }
                }
                ITransmissionService offeredOnCasted = item.As <ITransmissionService>();

                if ((offeredOnCasted != null))
                {
                    this._parent.OfferedOn.Add(offeredOnCasted);
                }
                if ((this._parent.PointOfReceiptFor == null))
                {
                    IServicePoint pointOfReceiptForCasted = item.As <IServicePoint>();
                    if ((pointOfReceiptForCasted != null))
                    {
                        this._parent.PointOfReceiptFor = pointOfReceiptForCasted;
                        return;
                    }
                }
                if ((this._parent.For == null))
                {
                    ITransmissionCorridor forCasted = item.As <ITransmissionCorridor>();
                    if ((forCasted != null))
                    {
                        this._parent.For = forCasted;
                        return;
                    }
                }
                ITransmissionProduct locatedOnCasted = item.As <ITransmissionProduct>();

                if ((locatedOnCasted != null))
                {
                    this._parent.LocatedOn.Add(locatedOnCasted);
                }
            }
Esempio n. 10
0
            /// <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);
                }
                IGeneratingUnit generatingUnitsCasted = item.As <IGeneratingUnit>();

                if ((generatingUnitsCasted != null))
                {
                    this._parent.GeneratingUnits.Add(generatingUnitsCasted);
                }
                IEnergyProduct energyProductsCasted = item.As <IEnergyProduct>();

                if ((energyProductsCasted != null))
                {
                    this._parent.EnergyProducts.Add(energyProductsCasted);
                }
            }
Esempio n. 11
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.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);
                }
            }
Esempio n. 12
0
            /// <summary>
            /// Adds the given element to the collection
            /// </summary>
            /// <param name="item">The item to add</param>
            public override void Add(IModelElement item)
            {
                IMeasurement by_MeasurementsCasted = item.As <IMeasurement>();

                if ((by_MeasurementsCasted != null))
                {
                    this._parent.By_Measurements.Add(by_MeasurementsCasted);
                }
                if ((this._parent.Declared_ServicePoint == null))
                {
                    IServicePoint declared_ServicePointCasted = item.As <IServicePoint>();
                    if ((declared_ServicePointCasted != null))
                    {
                        this._parent.Declared_ServicePoint = declared_ServicePointCasted;
                        return;
                    }
                }
                IMeasurement for_MeasurementsCasted = item.As <IMeasurement>();

                if ((for_MeasurementsCasted != null))
                {
                    this._parent.For_Measurements.Add(for_MeasurementsCasted);
                }
            }