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)
            {
                IClearanceTag clearanceTagsCasted = item.As <IClearanceTag>();

                if ((clearanceTagsCasted != null))
                {
                    this._parent.ClearanceTags.Add(clearanceTagsCasted);
                }
            }
Beispiel #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)
            {
                IClearanceTag clearanceTagItem = item.As <IClearanceTag>();

                if (((clearanceTagItem != null) &&
                     this._parent.ClearanceTags.Remove(clearanceTagItem)))
                {
                    return(true);
                }
                return(false);
            }
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)
            {
                IProtectionEquipment protectionEquipmentsCasted = item.As <IProtectionEquipment>();

                if ((protectionEquipmentsCasted != null))
                {
                    this._parent.ProtectionEquipments.Add(protectionEquipmentsCasted);
                }
                IOutageStepPsrRole outageStepRolesCasted = item.As <IOutageStepPsrRole>();

                if ((outageStepRolesCasted != null))
                {
                    this._parent.OutageStepRoles.Add(outageStepRolesCasted);
                }
                if ((this._parent.BaseVoltage == null))
                {
                    IBaseVoltage baseVoltageCasted = item.As <IBaseVoltage>();
                    if ((baseVoltageCasted != null))
                    {
                        this._parent.BaseVoltage = baseVoltageCasted;
                        return;
                    }
                }
                IClearanceTag clearanceTagsCasted = item.As <IClearanceTag>();

                if ((clearanceTagsCasted != null))
                {
                    this._parent.ClearanceTags.Add(clearanceTagsCasted);
                }
                if ((this._parent.SvStatus == null))
                {
                    ISvStatus svStatusCasted = item.As <ISvStatus>();
                    if ((svStatusCasted != null))
                    {
                        this._parent.SvStatus = svStatusCasted;
                        return;
                    }
                }
                IElectricalAsset electricalAssetsCasted = item.As <IElectricalAsset>();

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

                if ((terminalsCasted != null))
                {
                    this._parent.Terminals.Add(terminalsCasted);
                }
            }
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)
            {
                IProtectionEquipment protectionEquipmentItem = item.As <IProtectionEquipment>();

                if (((protectionEquipmentItem != null) &&
                     this._parent.ProtectionEquipments.Remove(protectionEquipmentItem)))
                {
                    return(true);
                }
                IOutageStepPsrRole outageStepPsrRoleItem = item.As <IOutageStepPsrRole>();

                if (((outageStepPsrRoleItem != null) &&
                     this._parent.OutageStepRoles.Remove(outageStepPsrRoleItem)))
                {
                    return(true);
                }
                if ((this._parent.BaseVoltage == item))
                {
                    this._parent.BaseVoltage = null;
                    return(true);
                }
                IClearanceTag clearanceTagItem = item.As <IClearanceTag>();

                if (((clearanceTagItem != null) &&
                     this._parent.ClearanceTags.Remove(clearanceTagItem)))
                {
                    return(true);
                }
                if ((this._parent.SvStatus == item))
                {
                    this._parent.SvStatus = null;
                    return(true);
                }
                IElectricalAsset electricalAssetItem = item.As <IElectricalAsset>();

                if (((electricalAssetItem != null) &&
                     this._parent.ElectricalAssets.Remove(electricalAssetItem)))
                {
                    return(true);
                }
                ITerminal terminalItem = item.As <ITerminal>();

                if (((terminalItem != null) &&
                     this._parent.Terminals.Remove(terminalItem)))
                {
                    return(true);
                }
                return(false);
            }
Beispiel #5
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.PowerSystemResource == item))
                {
                    this._parent.PowerSystemResource = null;
                    return(true);
                }
                IClearanceTag clearanceTagItem = item.As <IClearanceTag>();

                if (((clearanceTagItem != null) &&
                     this._parent.ClearanceTags.Remove(clearanceTagItem)))
                {
                    return(true);
                }
                ISwitchingStep switchingStepItem = item.As <ISwitchingStep>();

                if (((switchingStepItem != null) &&
                     this._parent.ScheduleSteps.Remove(switchingStepItem)))
                {
                    return(true);
                }
                return(false);
            }
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)
            {
                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);
                }
            }