Beispiel #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.Receive_HostControlArea == null))
     {
         IHostControlArea receive_HostControlAreaCasted = item.As <IHostControlArea>();
         if ((receive_HostControlAreaCasted != null))
         {
             this._parent.Receive_HostControlArea = receive_HostControlAreaCasted;
             return;
         }
     }
     if ((this._parent.Measurement == null))
     {
         IMeasurement measurementCasted = item.As <IMeasurement>();
         if ((measurementCasted != null))
         {
             this._parent.Measurement = measurementCasted;
             return;
         }
     }
     if ((this._parent.Send_HostControlArea == null))
     {
         IHostControlArea send_HostControlAreaCasted = item.As <IHostControlArea>();
         if ((send_HostControlAreaCasted != null))
         {
             this._parent.Send_HostControlArea = send_HostControlAreaCasted;
             return;
         }
     }
 }
Beispiel #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)
            {
                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);
                }
            }
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)
 {
     if ((this._parent.HostControlArea == null))
     {
         IHostControlArea hostControlAreaCasted = item.As <IHostControlArea>();
         if ((hostControlAreaCasted != null))
         {
             this._parent.HostControlArea = hostControlAreaCasted;
             return;
         }
     }
 }
Beispiel #4
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.ReserveEnergyTransaction == item))
                {
                    this._parent.ReserveEnergyTransaction = null;
                    return(true);
                }
                IHostControlArea hostControlAreaItem = item.As <IHostControlArea>();

                if (((hostControlAreaItem != null) &&
                     this._parent.HostControlAreas.Remove(hostControlAreaItem)))
                {
                    return(true);
                }
                return(false);
            }
Beispiel #5
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.ReserveEnergyTransaction == null))
                {
                    IReserve reserveEnergyTransactionCasted = item.As <IReserve>();
                    if ((reserveEnergyTransactionCasted != null))
                    {
                        this._parent.ReserveEnergyTransaction = reserveEnergyTransactionCasted;
                        return;
                    }
                }
                IHostControlArea hostControlAreasCasted = item.As <IHostControlArea>();

                if ((hostControlAreasCasted != null))
                {
                    this._parent.HostControlAreas.Add(hostControlAreasCasted);
                }
            }
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)
            {
                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;
                    }
                }
            }