public void AddRoot(string ChildSegment, Engine_Path_Endpoint Child) { // Ensure the dictionary is built correctly ensure_dictionary_built(); // Does an endpoint already exist here? if (rootPathsDictionary.ContainsKey(ChildSegment)) { Engine_Path_Endpoint matchingEndpoint = rootPathsDictionary[ChildSegment]; RootPaths.Remove(matchingEndpoint); } rootPathsDictionary[ChildSegment] = Child; RootPaths.Add(Child); }