Exemplo n.º 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)
            {
                IDistributionLineSegment conductorSegmentsCasted = item.As <IDistributionLineSegment>();

                if ((conductorSegmentsCasted != null))
                {
                    this._parent.ConductorSegments.Add(conductorSegmentsCasted);
                }
            }
Exemplo n.º 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)
            {
                IDistributionLineSegment distributionLineSegmentItem = item.As <IDistributionLineSegment>();

                if (((distributionLineSegmentItem != null) &&
                     this._parent.ConductorSegments.Remove(distributionLineSegmentItem)))
                {
                    return(true);
                }
                return(false);
            }
Exemplo n.º 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)
            {
                IDistributionLineSegment conductorSegmentsCasted = item.As <IDistributionLineSegment>();

                if ((conductorSegmentsCasted != null))
                {
                    this._parent.ConductorSegments.Add(conductorSegmentsCasted);
                }
                IPhaseImpedanceData phaseImpedanceDataCasted = item.As <IPhaseImpedanceData>();

                if ((phaseImpedanceDataCasted != null))
                {
                    this._parent.PhaseImpedanceData.Add(phaseImpedanceDataCasted);
                }
            }
Exemplo n.º 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.CircuitSection == null))
     {
         ICircuitSection circuitSectionCasted = item.As <ICircuitSection>();
         if ((circuitSectionCasted != null))
         {
             this._parent.CircuitSection = circuitSectionCasted;
             return;
         }
     }
     if ((this._parent.ConductorSegment == null))
     {
         IDistributionLineSegment conductorSegmentCasted = item.As <IDistributionLineSegment>();
         if ((conductorSegmentCasted != null))
         {
             this._parent.ConductorSegment = conductorSegmentCasted;
             return;
         }
     }
 }