public override void visit(Generated.Dictionary obj, bool visitSubNodes) { Dictionary dictionary = (Dictionary)obj; if (dictionary.allNameSpaceRefs() != null) { foreach (NameSpaceRef nameSpaceRef in dictionary.allNameSpaceRefs()) { Types.NameSpace nameSpace = nameSpaceRef.LoadNameSpace(LockFiles, AllowErrorsDuringLoad); if (nameSpace != null) { dictionary.appendNameSpaces(nameSpace); nameSpace.NameSpaceRef = nameSpaceRef; } else { ErrorsDuringLoad.Add(new ElementLog(ElementLog.LevelEnum.Error, "Cannot load file " + nameSpaceRef.FileName)); } } dictionary.allNameSpaceRefs().Clear(); } if (dictionary.allTestRefs() != null) { foreach (FrameRef testRef in dictionary.allTestRefs()) { Frame frame = testRef.LoadFrame(LockFiles, AllowErrorsDuringLoad); if (frame != null) { dictionary.appendTests(frame); frame.FrameRef = testRef; } else { ErrorsDuringLoad.Add(new ElementLog(ElementLog.LevelEnum.Error, "Cannot load file " + testRef.FileName)); } } dictionary.allTestRefs().Clear(); } base.visit(obj, visitSubNodes); }
public override void visit(Generated.Dictionary obj, bool visitSubNodes) { Dictionary dictionary = (Dictionary)obj; if (dictionary.allNameSpaceRefs() != null) { foreach (NameSpaceRef nameSpaceRef in dictionary.allNameSpaceRefs()) { dictionary.appendNameSpaces(nameSpaceRef.LoadNameSpace()); } dictionary.allNameSpaceRefs().Clear(); } if (dictionary.allTestRefs() != null) { foreach (FrameRef testRef in dictionary.allTestRefs()) { dictionary.appendTests(testRef.LoadFrame()); } dictionary.allTestRefs().Clear(); } base.visit(obj, visitSubNodes); }
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(); } } }