/// <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.PhaseImpedance == null)) { IPerLengthPhaseImpedance phaseImpedanceCasted = item.As <IPerLengthPhaseImpedance>(); if ((phaseImpedanceCasted != null)) { this._parent.PhaseImpedance = phaseImpedanceCasted; return; } } }
/// <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.PhaseImpedance == null)) { IPerLengthPhaseImpedance phaseImpedanceCasted = item.As <IPerLengthPhaseImpedance>(); if ((phaseImpedanceCasted != null)) { this._parent.PhaseImpedance = phaseImpedanceCasted; return; } } IConductorAsset conductorAssetsCasted = item.As <IConductorAsset>(); if ((conductorAssetsCasted != null)) { this._parent.ConductorAssets.Add(conductorAssetsCasted); } if ((this._parent.SequenceImpedance == null)) { IPerLengthSequenceImpedance sequenceImpedanceCasted = item.As <IPerLengthSequenceImpedance>(); if ((sequenceImpedanceCasted != null)) { this._parent.SequenceImpedance = sequenceImpedanceCasted; return; } } if ((this._parent.ConductorInfo == null)) { IConductorInfo conductorInfoCasted = item.As <IConductorInfo>(); if ((conductorInfoCasted != null)) { this._parent.ConductorInfo = conductorInfoCasted; return; } } }