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); } }
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); } }