public override void visit(Generated.Dictionary obj, bool visitSubNodes) { base.visit(obj, visitSubNodes); Dictionary dictionary = (Dictionary)obj; if (_beforeSave) { dictionary.ClearTempFiles(); dictionary.allNameSpaceRefs().Clear(); dictionary.allTestRefs().Clear(); // Only split namespace and test files when the dictionary holds namespaces if (dictionary.countNameSpaces() > 0) { foreach (Types.NameSpace subNameSpace in dictionary.allNameSpaces()) { dictionary.appendNameSpaceRefs(referenceNameSpace(dictionary, subNameSpace)); } if (dictionary.allTests() != null) { foreach (Frame frame in dictionary.allTests()) { dictionary.appendTestRefs(referenceFrame(dictionary, frame)); } } dictionary.StoreInfo(); } } else { // Only build back split information when the dictionary held namespaces if (dictionary._savedNameSpaces != null && dictionary._savedNameSpaces.Count > 0) { dictionary.RestoreInfo(); } } }