CSharpUML.MainClass.Code2Uml C# (CSharp) Méthode

Code2Uml() private static méthode

private static Code2Uml ( IEnumerable paths, string target ) : void
paths IEnumerable
target string
Résultat void
        private static void Code2Uml(IEnumerable<string> paths, string target)
        {
            foreach (string path in paths) {
                Console.WriteLine (path);
                Action<string> processFile = (filename) => {
                    if (!filename.Contains ("gen")) {
                        IParser parser = new CSharpParser ();
                        IEnumerable<IUmlObject> objects = parser.Parse (filename);
                        List<string> lines = new List<string> ();
                        foreach (IUmlObject obj in objects) {
                            lines.Add (obj.ToUmlCode ());
                        }
                        string umlfile = filename.Replace (".cs", ".uml");
                        if (target.Length > 0) {
                            umlfile = umlfile.ReplaceFirst (path, target + "/");
                        }
                        Console.WriteLine ("Write: " + umlfile);
                        Files.WriteLines (umlfile, lines);
                    }
                };
                Files.SearchFiles (path, new string[]{".cs"}, processFile);
            }
        }