Beispiel #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.Holds == item))
                {
                    this._parent.Holds = null;
                    return(true);
                }
                ITransmissionService transmissionServiceItem = item.As <ITransmissionService>();

                if (((transmissionServiceItem != null) &&
                     this._parent.Reserves_TransmissionService.Remove(transmissionServiceItem)))
                {
                    return(true);
                }
                IAncillaryService ancillaryServiceItem = item.As <IAncillaryService>();

                if (((ancillaryServiceItem != null) &&
                     this._parent.Reserves_AncillaryServices.Remove(ancillaryServiceItem)))
                {
                    return(true);
                }
                if ((this._parent.Resells == item))
                {
                    this._parent.Resells = null;
                    return(true);
                }
                if ((this._parent.Sells == item))
                {
                    this._parent.Sells = null;
                    return(true);
                }
                return(false);
            }
Beispiel #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);
                }
                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);
            }
Beispiel #3
0
            /// <summary>
            /// Adds the given element to the collection
            /// </summary>
            /// <param name="item">The item to add</param>
            public override void Add(IModelElement item)
            {
                ITransmissionService providedBy_TransmissionServiceCasted = item.As <ITransmissionService>();

                if ((providedBy_TransmissionServiceCasted != null))
                {
                    this._parent.ProvidedBy_TransmissionService.Add(providedBy_TransmissionServiceCasted);
                }
                IAncillaryService ancillaryServicesCasted = item.As <IAncillaryService>();

                if ((ancillaryServicesCasted != null))
                {
                    this._parent.AncillaryServices.Add(ancillaryServicesCasted);
                }
            }
Beispiel #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)
            {
                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);
                }
            }
Beispiel #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)
            {
                ITransmissionService transmissionServiceItem = item.As <ITransmissionService>();

                if (((transmissionServiceItem != null) &&
                     this._parent.ProvidedBy_TransmissionService.Remove(transmissionServiceItem)))
                {
                    return(true);
                }
                IAncillaryService ancillaryServiceItem = item.As <IAncillaryService>();

                if (((ancillaryServiceItem != null) &&
                     this._parent.AncillaryServices.Remove(ancillaryServiceItem)))
                {
                    return(true);
                }
                return(false);
            }
Beispiel #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)
            {
                if ((this._parent.Holds == null))
                {
                    IMarketer holdsCasted = item.As <IMarketer>();
                    if ((holdsCasted != null))
                    {
                        this._parent.Holds = holdsCasted;
                        return;
                    }
                }
                ITransmissionService reserves_TransmissionServiceCasted = item.As <ITransmissionService>();

                if ((reserves_TransmissionServiceCasted != null))
                {
                    this._parent.Reserves_TransmissionService.Add(reserves_TransmissionServiceCasted);
                }
                IAncillaryService reserves_AncillaryServicesCasted = item.As <IAncillaryService>();

                if ((reserves_AncillaryServicesCasted != null))
                {
                    this._parent.Reserves_AncillaryServices.Add(reserves_AncillaryServicesCasted);
                }
                if ((this._parent.Resells == null))
                {
                    IMarketer resellsCasted = item.As <IMarketer>();
                    if ((resellsCasted != null))
                    {
                        this._parent.Resells = resellsCasted;
                        return;
                    }
                }
                if ((this._parent.Sells == null))
                {
                    ITransmissionProvider sellsCasted = item.As <ITransmissionProvider>();
                    if ((sellsCasted != null))
                    {
                        this._parent.Sells = sellsCasted;
                        return;
                    }
                }
            }
Beispiel #7
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)
            {
                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);
            }
Beispiel #8
0
            /// <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;
                    }
                }
            }