public bool AddReservedObject(ObjectIdInfo objectIdInfo) { if (!ConsideredObjectTypes.Contains(objectIdInfo.ObjectType)) { return(true); } if (innerDictionary.ContainsKey(objectIdInfo.ObjectID)) { innerDictionary[objectIdInfo.ObjectID].SetAvailability(objectIdInfo.ObjectType, Availability.Reserved); return(true); } else { return(false); } }
public bool AddUsedObject(ObjectIdInfo objectIdInfo) { // Returns false if the object's ID is outside of the ranges in the collection if (!ConsideredObjectTypes.Contains(objectIdInfo.ObjectType)) { return(true); } if (innerDictionary.ContainsKey(objectIdInfo.ObjectID)) { innerDictionary[objectIdInfo.ObjectID].SetAvailability(objectIdInfo.ObjectType, Availability.InUse); return(true); } else { return(false); } }