internal void Neuter() { idToObject = new IdToObject(); typeNameToGcType = new Dictionary <string, GcType>(); typeIdToGcType = new Dictionary <int, GcType>(intEqualityComparer); addressToForwardReferences = new Dictionary <ulong, ForwardReference>(); roots = null; rootIDs = null; }
public T GetById(int id) { T existingObj = null; if (IdToObject.TryGetValue(id, out existingObj)) { return(existingObj); } return(ReadThrough(id)); }
private T PassThrought(T obj, int id) { T existingObj = null; if (IdToObject.TryGetValue(id, out existingObj)) { return(existingObj); } IdToObject[id] = obj; return(obj); }
internal ObjectGraph(ReadNewLog readNewLog, int tickIndex) { // // TODO: Add constructor logic here // idToObject = new IdToObject(); typeNameToGcType = new Dictionary <string, GcType>(); intEqualityComparer = new IntEqualityComparer(); typeIdToGcType = new Dictionary <int, GcType>(intEqualityComparer); addressToForwardReferences = new Dictionary <ulong, ForwardReference>(); unknownTypeId = GetOrCreateGcType("<unknown type>"); this.readNewLog = readNewLog; this.tickIndex = tickIndex; empty = true; }