示例#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)
            {
                if ((this._parent.TransmissionCorridor == null))
                {
                    ITransmissionCorridor transmissionCorridorCasted = item.As <ITransmissionCorridor>();
                    if ((transmissionCorridorCasted != null))
                    {
                        this._parent.TransmissionCorridor = transmissionCorridorCasted;
                        return;
                    }
                }
                ILine linesCasted = item.As <ILine>();

                if ((linesCasted != null))
                {
                    this._parent.Lines.Add(linesCasted);
                }
            }
示例#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.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);
                }
            }