public override void GetReferences(Dictionary <ModelCode, List <long> > references, TypeOfReference refType) { if (ConnectivityNodes != null && ConnectivityNodes.Count > 0 && (refType == TypeOfReference.Target || refType == TypeOfReference.Both)) { references[ModelCode.CONNECTNODECONT_CONNECTNODES] = ConnectivityNodes.GetRange(0, ConnectivityNodes.Count); } base.GetReferences(references, refType); }
public override void AddReference(ModelCode referenceId, long globalId) { switch (referenceId) { case ModelCode.CONNECTIVITYNODE_CNODECONT: ConnectivityNodes.Add(globalId); break; default: base.AddReference(referenceId, globalId); break; } }
//ConnectivityNodes public List <ConnectivityNodes> ListConnectivityNodes() { var list = new List <ConnectivityNodes>(); ConnectivityNodes obj; for (int i = 0; i <= 3; i++) { obj = new ConnectivityNodes(); obj._ConnectivityNodeID = i.ToString(); obj._VoltageID = "0"; obj._LineID = "0"; list.Add(obj); } return(list); }
public override void RemoveReference(ModelCode referenceId, long globalId) { switch (referenceId) { case ModelCode.CONNECTNODE_CONNECTNODECONT: if (ConnectivityNodes.Contains(globalId)) { ConnectivityNodes.Remove(globalId); } else { CommonTrace.WriteTrace(CommonTrace.TraceWarning, "Entity(GID = 0x{ 0:x16}) doesn't contain reference 0x{1:x16}.", this.GlobalId, globalId); } break; default: base.RemoveReference(referenceId, globalId); break; } }