public override void GetReferences(Dictionary <ModelCode, List <long> > references, TypeOfReference refType) { if (TransformerWindings != null && TransformerWindings.Count != 0 && (refType == TypeOfReference.Target || refType == TypeOfReference.Both)) { references[ModelCode.POWERTRANSFORMER_TRWINDINGS] = TransformerWindings.GetRange(0, TransformerWindings.Count); } base.GetReferences(references, refType); }
public override void AddReference(ModelCode referenceId, long globalId) { switch (referenceId) { case ModelCode.TRANSFORMERWINDING_POWERTR: TransformerWindings.Add(globalId); break; default: base.AddReference(referenceId, globalId); break; } }
public override void RemoveReference(ModelCode referenceId, long globalId) { switch (referenceId) { case ModelCode.TRANSFORMERWINDING_POWERTR: if (TransformerWindings.Contains(globalId)) { TransformerWindings.Remove(globalId); } else { CommonTrace.WriteTrace(CommonTrace.TraceWarning, "Entity (GID = 0x{0:x16}) doesn't contain reference 0x{1:x16}.", this.GID, globalId); } break; default: base.RemoveReference(referenceId, globalId); break; } }
protected PowerTransformer(PowerTransformer pt) : base(pt) { TransformerWindings.AddRange(pt.TransformerWindings); }