예제 #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)
            {
                ICircuit circuitItem = item.As <ICircuit>();

                if (((circuitItem != null) &&
                     this._parent.Circuits.Remove(circuitItem)))
                {
                    return(true);
                }
                INetworkDataSet networkDataSetItem = item.As <INetworkDataSet>();

                if (((networkDataSetItem != null) &&
                     this._parent.NetworkDataSets.Remove(networkDataSetItem)))
                {
                    return(true);
                }
                IPowerSystemResource powerSystemResourceItem = item.As <IPowerSystemResource>();

                if (((powerSystemResourceItem != null) &&
                     this._parent.PowerSystemResources.Remove(powerSystemResourceItem)))
                {
                    return(true);
                }
                IConductorAsset conductorAssetItem = item.As <IConductorAsset>();

                if (((conductorAssetItem != null) &&
                     this._parent.ConductorAssets.Remove(conductorAssetItem)))
                {
                    return(true);
                }
                return(false);
            }
예제 #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.PlannedOutage == null))
                {
                    IPlannedOutage plannedOutageCasted = item.As <IPlannedOutage>();
                    if ((plannedOutageCasted != null))
                    {
                        this._parent.PlannedOutage = plannedOutageCasted;
                        return;
                    }
                }
                if ((this._parent.PowerSystemResource == null))
                {
                    IPowerSystemResource powerSystemResourceCasted = item.As <IPowerSystemResource>();
                    if ((powerSystemResourceCasted != null))
                    {
                        this._parent.PowerSystemResource = powerSystemResourceCasted;
                        return;
                    }
                }
                ISwitchingOperation switchingOperationsCasted = item.As <ISwitchingOperation>();

                if ((switchingOperationsCasted != null))
                {
                    this._parent.SwitchingOperations.Add(switchingOperationsCasted);
                }
            }
예제 #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)
            {
                ICircuit circuitsCasted = item.As <ICircuit>();

                if ((circuitsCasted != null))
                {
                    this._parent.Circuits.Add(circuitsCasted);
                }
                INetworkDataSet networkDataSetsCasted = item.As <INetworkDataSet>();

                if ((networkDataSetsCasted != null))
                {
                    this._parent.NetworkDataSets.Add(networkDataSetsCasted);
                }
                IPowerSystemResource powerSystemResourcesCasted = item.As <IPowerSystemResource>();

                if ((powerSystemResourcesCasted != null))
                {
                    this._parent.PowerSystemResources.Add(powerSystemResourcesCasted);
                }
                IConductorAsset conductorAssetsCasted = item.As <IConductorAsset>();

                if ((conductorAssetsCasted != null))
                {
                    this._parent.ConductorAssets.Add(conductorAssetsCasted);
                }
            }
예제 #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)
            {
                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);
            }
예제 #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)
            {
                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;
                    }
                }
            }
예제 #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)
            {
                IPowerSystemResource powerSystemResourcesCasted = item.As <IPowerSystemResource>();

                if ((powerSystemResourcesCasted != null))
                {
                    this._parent.PowerSystemResources.Add(powerSystemResourcesCasted);
                }
            }
예제 #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)
            {
                IPowerSystemResource powerSystemResourceItem = item.As <IPowerSystemResource>();

                if (((powerSystemResourceItem != null) &&
                     this._parent.PowerSystemResources.Remove(powerSystemResourceItem)))
                {
                    return(true);
                }
                return(false);
            }
예제 #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)
 {
     if ((this._parent.PowerSystemResource == null))
     {
         IPowerSystemResource powerSystemResourceCasted = item.As <IPowerSystemResource>();
         if ((powerSystemResourceCasted != null))
         {
             this._parent.PowerSystemResource = powerSystemResourceCasted;
             return;
         }
     }
 }
예제 #9
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)
            {
                ICircuitSection circuitSectionItem = item.As <ICircuitSection>();

                if (((circuitSectionItem != null) &&
                     this._parent.CircuitSections.Remove(circuitSectionItem)))
                {
                    return(true);
                }
                IChangeItem changeItemItem = item.As <IChangeItem>();

                if (((changeItemItem != null) &&
                     this._parent.ChangeItems.Remove(changeItemItem)))
                {
                    return(true);
                }
                IChangeSet changeSetItem = item.As <IChangeSet>();

                if (((changeSetItem != null) &&
                     this._parent.ChangeSets.Remove(changeSetItem)))
                {
                    return(true);
                }
                IPowerSystemResource powerSystemResourceItem = item.As <IPowerSystemResource>();

                if (((powerSystemResourceItem != null) &&
                     this._parent.PowerSystemResources.Remove(powerSystemResourceItem)))
                {
                    return(true);
                }
                if ((this._parent.Status == item))
                {
                    this._parent.Status = null;
                    return(true);
                }
                ILandBase landBaseItem = item.As <ILandBase>();

                if (((landBaseItem != null) &&
                     this._parent.LandBases.Remove(landBaseItem)))
                {
                    return(true);
                }
                IDocument documentItem = item.As <IDocument>();

                if (((documentItem != null) &&
                     this._parent.Documents.Remove(documentItem)))
                {
                    return(true);
                }
                return(false);
            }
예제 #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)
            {
                ICircuitSection circuitSectionsCasted = item.As <ICircuitSection>();

                if ((circuitSectionsCasted != null))
                {
                    this._parent.CircuitSections.Add(circuitSectionsCasted);
                }
                IChangeItem changeItemsCasted = item.As <IChangeItem>();

                if ((changeItemsCasted != null))
                {
                    this._parent.ChangeItems.Add(changeItemsCasted);
                }
                IChangeSet changeSetsCasted = item.As <IChangeSet>();

                if ((changeSetsCasted != null))
                {
                    this._parent.ChangeSets.Add(changeSetsCasted);
                }
                IPowerSystemResource powerSystemResourcesCasted = item.As <IPowerSystemResource>();

                if ((powerSystemResourcesCasted != null))
                {
                    this._parent.PowerSystemResources.Add(powerSystemResourcesCasted);
                }
                if ((this._parent.Status == null))
                {
                    IStatus statusCasted = item.As <IStatus>();
                    if ((statusCasted != null))
                    {
                        this._parent.Status = statusCasted;
                        return;
                    }
                }
                ILandBase landBasesCasted = item.As <ILandBase>();

                if ((landBasesCasted != null))
                {
                    this._parent.LandBases.Add(landBasesCasted);
                }
                IDocument documentsCasted = item.As <IDocument>();

                if ((documentsCasted != null))
                {
                    this._parent.Documents.Add(documentsCasted);
                }
            }
예제 #11
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.Position == null))
                {
                    IPositionPoint positionCasted = item.As <IPositionPoint>();
                    if ((positionCasted != null))
                    {
                        this._parent.Position = positionCasted;
                        return;
                    }
                }
                IPowerSystemResource powerSystemResourcesCasted = item.As <IPowerSystemResource>();

                if ((powerSystemResourcesCasted != null))
                {
                    this._parent.PowerSystemResources.Add(powerSystemResourcesCasted);
                }
            }
예제 #12
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.PowerSystemResource == null))
     {
         IPowerSystemResource powerSystemResourceCasted = item.As <IPowerSystemResource>();
         if ((powerSystemResourceCasted != null))
         {
             this._parent.PowerSystemResource = powerSystemResourceCasted;
             return;
         }
     }
     if ((this._parent.OperatingParticipant == null))
     {
         IOperatingParticipant operatingParticipantCasted = item.As <IOperatingParticipant>();
         if ((operatingParticipantCasted != null))
         {
             this._parent.OperatingParticipant = operatingParticipantCasted;
             return;
         }
     }
 }
예제 #13
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.PowerSystemResource == null))
     {
         IPowerSystemResource powerSystemResourceCasted = item.As <IPowerSystemResource>();
         if ((powerSystemResourceCasted != null))
         {
             this._parent.PowerSystemResource = powerSystemResourceCasted;
             return;
         }
     }
     if ((this._parent.ErpOrganisation == null))
     {
         IErpOrganisation erpOrganisationCasted = item.As <IErpOrganisation>();
         if ((erpOrganisationCasted != null))
         {
             this._parent.ErpOrganisation = erpOrganisationCasted;
             return;
         }
     }
 }
예제 #14
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.PowerSystemResource == null))
                {
                    IPowerSystemResource powerSystemResourceCasted = item.As <IPowerSystemResource>();
                    if ((powerSystemResourceCasted != null))
                    {
                        this._parent.PowerSystemResource = powerSystemResourceCasted;
                        return;
                    }
                }
                IClearanceTag clearanceTagsCasted = item.As <IClearanceTag>();

                if ((clearanceTagsCasted != null))
                {
                    this._parent.ClearanceTags.Add(clearanceTagsCasted);
                }
                ISwitchingStep scheduleStepsCasted = item.As <ISwitchingStep>();

                if ((scheduleStepsCasted != null))
                {
                    this._parent.ScheduleSteps.Add(scheduleStepsCasted);
                }
            }