public override void RemoveReference(ModelCode referenceId, long globalId) { switch (referenceId) { case ModelCode.AOR_AREA_AGGREGATOR: if (AORAreas.Contains(globalId)) { AORAreas.Remove(globalId); } else { CommonTrace.WriteTrace(CommonTrace.TraceWarning, "Entity (GID = 0x{0:x16}) doesn't contain reference 0x{1:x16}.", this.GlobalId, globalId); } break; case ModelCode.AOR_GROUP_AGGREGATOR: if (AORGroups.Contains(globalId)) { AORGroups.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; } }
public override void GetReferences(Dictionary <ModelCode, List <long> > references, TypeOfReference refType) { if (AORAreas != null && AORAreas.Count > 0 && (refType == TypeOfReference.Target || refType == TypeOfReference.Both)) { references[ModelCode.AOR_AGAGGREGATOR_AORAREAS] = AORAreas.GetRange(0, AORAreas.Count); } if (AORGroups != null && AORGroups.Count > 0 && (refType == TypeOfReference.Target || refType == TypeOfReference.Both)) { references[ModelCode.AOR_AGAGGREGATOR_AORGROUPS] = AORGroups.GetRange(0, AORGroups.Count); } base.GetReferences(references, refType); }
public override void AddReference(ModelCode referenceId, long globalId) { switch (referenceId) { case ModelCode.AOR_AREA_AGGREGATOR: AORAreas.Add(globalId); break; case ModelCode.AOR_GROUP_AGGREGATOR: AORGroups.Add(globalId); break; default: base.AddReference(referenceId, globalId); break; } }