Esempio n. 1
0
            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);
            }
Esempio n. 2
0
            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);
            }
Esempio n. 3
0
            /// <summary>
            /// Generates the file in the background thread
            /// </summary>
            /// <param name="arg"></param>
            public override void ExecuteWork()
            {
                DataDictionary.Tests.Frame frame = Dictionary.findFrame(SUBSET_076);
                if (frame == null)
                {
                    frame      = (DataDictionary.Tests.Frame)DataDictionary.Generated.acceptor.getFactory().createFrame();
                    frame.Name = SUBSET_076;
                    Dictionary.appendTests(frame);
                }

                if (ImportMode == Mode.File)
                {
                    Importers.TestImporter importer = new Importers.TestImporter(FileName, DB_PASSWORD);
                    importer.Import(frame);
                }
                else
                {
                    foreach (string fName in System.IO.Directory.GetFiles(FileName, "*.mdb"))
                    {
                        Importers.TestImporter importer = new Importers.TestImporter(fName, DB_PASSWORD);
                        importer.Import(frame);
                    }
                }
            }