/// <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); } }
/// <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); }
/// <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); } }
/// <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; } } }