Example #1
0
            /// <summary>
            /// Adds the given element to the collection
            /// </summary>
            /// <param name="item">The item to add</param>
            public override void Add(IModelElement item)
            {
                ITransmissionPath offeringCasted = item.As <ITransmissionPath>();

                if ((offeringCasted != null))
                {
                    this._parent.Offering.Add(offeringCasted);
                }
                ITransmissionProduct offeredAsCasted = item.As <ITransmissionProduct>();

                if ((offeredAsCasted != null))
                {
                    this._parent.OfferedAs.Add(offeredAsCasted);
                }
                IAvailableTransmissionCapacity scheduledByCasted = item.As <IAvailableTransmissionCapacity>();

                if ((scheduledByCasted != null))
                {
                    this._parent.ScheduledBy.Add(scheduledByCasted);
                }
                IServiceReservation reservedBy_ServiceReservationCasted = item.As <IServiceReservation>();

                if ((reservedBy_ServiceReservationCasted != null))
                {
                    this._parent.ReservedBy_ServiceReservation.Add(reservedBy_ServiceReservationCasted);
                }
                if ((this._parent.TransContractFor == null))
                {
                    IOpenAccessProduct transContractForCasted = item.As <IOpenAccessProduct>();
                    if ((transContractForCasted != null))
                    {
                        this._parent.TransContractFor = transContractForCasted;
                        return;
                    }
                }
                if ((this._parent.Offers == null))
                {
                    ITransmissionProvider offersCasted = item.As <ITransmissionProvider>();
                    if ((offersCasted != null))
                    {
                        this._parent.Offers = offersCasted;
                        return;
                    }
                }
            }
Example #2
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.OpenAccessProduct == null))
                {
                    IOpenAccessProduct openAccessProductCasted = item.As <IOpenAccessProduct>();
                    if ((openAccessProductCasted != null))
                    {
                        this._parent.OpenAccessProduct = openAccessProductCasted;
                        return;
                    }
                }
                ITransmissionProvider transmissionProvidersCasted = item.As <ITransmissionProvider>();

                if ((transmissionProvidersCasted != null))
                {
                    this._parent.TransmissionProviders.Add(transmissionProvidersCasted);
                }
                if ((this._parent.ReservedBy_ServiceReservation == null))
                {
                    IServiceReservation reservedBy_ServiceReservationCasted = item.As <IServiceReservation>();
                    if ((reservedBy_ServiceReservationCasted != null))
                    {
                        this._parent.ReservedBy_ServiceReservation = reservedBy_ServiceReservationCasted;
                        return;
                    }
                }
                if ((this._parent.ControlAreaOperator == null))
                {
                    IControlAreaOperator controlAreaOperatorCasted = item.As <IControlAreaOperator>();
                    if ((controlAreaOperatorCasted != null))
                    {
                        this._parent.ControlAreaOperator = controlAreaOperatorCasted;
                        return;
                    }
                }
            }