コード例 #1
0
        static void AddEaslyFiles(string path)
        {
            foreach (string FileName in Directory.GetFiles(path, "*.easly"))
            {
                FileNameTable.Add(FileName.Replace("\\", "/"));

                using (FileStream fs = new FileStream(FileName, FileMode.Open, FileAccess.Read))
                {
                    Node RootNode = DeserializeAndFix(fs);

                    if (FirstRootNode == null)
                    {
                        FirstRootNode = RootNode;
                    }
                }
            }

            foreach (string Folder in Directory.GetDirectories(path))
            {
                AddEaslyFiles(Folder);
            }
        }
コード例 #2
0
        private static void AddEaslyFiles(string path)
        {
            foreach (string FileName in Directory.GetFiles(path, "*.easly"))
            {
                FileNameTable.Add(FileName.Replace("\\", "/"));

                if (FileName.EndsWith("coverage.easly"))
                {
                    using (FileStream fs = new FileStream(FileName, FileMode.Open, FileAccess.Read))
                    {
                        Serializer Serializer = new Serializer();
                        INode      RootNode   = Serializer.Deserialize(fs) as INode;

                        CoverageNode = RootNode;
                    }
                }
            }

            foreach (string Folder in Directory.GetDirectories(path))
            {
                AddEaslyFiles(Folder);
            }
        }