Пример #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)
            {
                ITopologicalNode topologicalNodeItem = item.As <ITopologicalNode>();

                if (((topologicalNodeItem != null) &&
                     this._parent.TopologicalNode.Remove(topologicalNodeItem)))
                {
                    return(true);
                }
                IVoltageLevel voltageLevelItem = item.As <IVoltageLevel>();

                if (((voltageLevelItem != null) &&
                     this._parent.VoltageLevel.Remove(voltageLevelItem)))
                {
                    return(true);
                }
                IConductingEquipment conductingEquipmentItem = item.As <IConductingEquipment>();

                if (((conductingEquipmentItem != null) &&
                     this._parent.ConductingEquipment.Remove(conductingEquipmentItem)))
                {
                    return(true);
                }
                return(false);
            }
Пример #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)
            {
                IPowerSystemResource powerSystemResourceItem = item.As <IPowerSystemResource>();

                if (((powerSystemResourceItem != null) &&
                     this._parent.PowerSystemResource.Remove(powerSystemResourceItem)))
                {
                    return(true);
                }
                IBusNameMarker busNameMarkerItem = item.As <IBusNameMarker>();

                if (((busNameMarkerItem != null) &&
                     this._parent.BusNameMarker.Remove(busNameMarkerItem)))
                {
                    return(true);
                }
                ITopologicalNode topologicalNodeItem = item.As <ITopologicalNode>();

                if (((topologicalNodeItem != null) &&
                     this._parent.TopologicalNode.Remove(topologicalNodeItem)))
                {
                    return(true);
                }
                if ((this._parent.ReportingSuperGroup == item))
                {
                    this._parent.ReportingSuperGroup = null;
                    return(true);
                }
                return(false);
            }
Пример #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)
            {
                IPowerSystemResource powerSystemResourceCasted = item.As <IPowerSystemResource>();

                if ((powerSystemResourceCasted != null))
                {
                    this._parent.PowerSystemResource.Add(powerSystemResourceCasted);
                }
                IBusNameMarker busNameMarkerCasted = item.As <IBusNameMarker>();

                if ((busNameMarkerCasted != null))
                {
                    this._parent.BusNameMarker.Add(busNameMarkerCasted);
                }
                ITopologicalNode topologicalNodeCasted = item.As <ITopologicalNode>();

                if ((topologicalNodeCasted != null))
                {
                    this._parent.TopologicalNode.Add(topologicalNodeCasted);
                }
                if ((this._parent.ReportingSuperGroup == null))
                {
                    IReportingSuperGroup reportingSuperGroupCasted = item.As <IReportingSuperGroup>();
                    if ((reportingSuperGroupCasted != null))
                    {
                        this._parent.ReportingSuperGroup = reportingSuperGroupCasted;
                        return;
                    }
                }
            }
Пример #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)
            {
                if ((this._parent.ConnectivityNodeContainer == null))
                {
                    IConnectivityNodeContainer connectivityNodeContainerCasted = item.As <IConnectivityNodeContainer>();
                    if ((connectivityNodeContainerCasted != null))
                    {
                        this._parent.ConnectivityNodeContainer = connectivityNodeContainerCasted;
                        return;
                    }
                }
                if ((this._parent.TopologicalNode == null))
                {
                    ITopologicalNode topologicalNodeCasted = item.As <ITopologicalNode>();
                    if ((topologicalNodeCasted != null))
                    {
                        this._parent.TopologicalNode = topologicalNodeCasted;
                        return;
                    }
                }
                if ((this._parent.BusNameMarker == null))
                {
                    IBusNameMarker busNameMarkerCasted = item.As <IBusNameMarker>();
                    if ((busNameMarkerCasted != null))
                    {
                        this._parent.BusNameMarker = busNameMarkerCasted;
                        return;
                    }
                }
                ILossPenaltyFactor lossPenaltyFactorsCasted = item.As <ILossPenaltyFactor>();

                if ((lossPenaltyFactorsCasted != null))
                {
                    this._parent.LossPenaltyFactors.Add(lossPenaltyFactorsCasted);
                }
                INodeConstraintTerm nodeConstraintTermsCasted = item.As <INodeConstraintTerm>();

                if ((nodeConstraintTermsCasted != null))
                {
                    this._parent.NodeConstraintTerms.Add(nodeConstraintTermsCasted);
                }
                ITerminal terminalsCasted = item.As <ITerminal>();

                if ((terminalsCasted != null))
                {
                    this._parent.Terminals.Add(terminalsCasted);
                }
                if ((this._parent.Pnode == null))
                {
                    IPnode pnodeCasted = item.As <IPnode>();
                    if ((pnodeCasted != null))
                    {
                        this._parent.Pnode = pnodeCasted;
                        return;
                    }
                }
            }
Пример #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.TopologicalNode == null))
     {
         ITopologicalNode topologicalNodeCasted = item.As <ITopologicalNode>();
         if ((topologicalNodeCasted != null))
         {
             this._parent.TopologicalNode = topologicalNodeCasted;
             return;
         }
     }
 }
Пример #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)
            {
                IConnectivityNode connectivityNodesCasted = item.As <IConnectivityNode>();

                if ((connectivityNodesCasted != null))
                {
                    this._parent.ConnectivityNodes.Add(connectivityNodesCasted);
                }
                ITopologicalNode topologicalNodeCasted = item.As <ITopologicalNode>();

                if ((topologicalNodeCasted != null))
                {
                    this._parent.TopologicalNode.Add(topologicalNodeCasted);
                }
            }
Пример #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)
            {
                if ((this._parent.AngleRef_TopologicalNode == item))
                {
                    this._parent.AngleRef_TopologicalNode = null;
                    return(true);
                }
                ITopologicalNode topologicalNodeItem = item.As <ITopologicalNode>();

                if (((topologicalNodeItem != null) &&
                     this._parent.TopologicalNodes.Remove(topologicalNodeItem)))
                {
                    return(true);
                }
                return(false);
            }
Пример #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)
            {
                IConnectivityNode connectivityNodeItem = item.As <IConnectivityNode>();

                if (((connectivityNodeItem != null) &&
                     this._parent.ConnectivityNodes.Remove(connectivityNodeItem)))
                {
                    return(true);
                }
                ITopologicalNode topologicalNodeItem = item.As <ITopologicalNode>();

                if (((topologicalNodeItem != null) &&
                     this._parent.TopologicalNode.Remove(topologicalNodeItem)))
                {
                    return(true);
                }
                return(false);
            }
Пример #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.AngleRef_TopologicalNode == null))
                {
                    ITopologicalNode angleRef_TopologicalNodeCasted = item.As <ITopologicalNode>();
                    if ((angleRef_TopologicalNodeCasted != null))
                    {
                        this._parent.AngleRef_TopologicalNode = angleRef_TopologicalNodeCasted;
                        return;
                    }
                }
                ITopologicalNode topologicalNodesCasted = item.As <ITopologicalNode>();

                if ((topologicalNodesCasted != null))
                {
                    this._parent.TopologicalNodes.Add(topologicalNodesCasted);
                }
            }
Пример #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)
            {
                ITopologicalNode topologicalNodeCasted = item.As <ITopologicalNode>();

                if ((topologicalNodeCasted != null))
                {
                    this._parent.TopologicalNode.Add(topologicalNodeCasted);
                }
                IVoltageLevel voltageLevelCasted = item.As <IVoltageLevel>();

                if ((voltageLevelCasted != null))
                {
                    this._parent.VoltageLevel.Add(voltageLevelCasted);
                }
                IConductingEquipment conductingEquipmentCasted = item.As <IConductingEquipment>();

                if ((conductingEquipmentCasted != null))
                {
                    this._parent.ConductingEquipment.Add(conductingEquipmentCasted);
                }
            }