ProjectsFolder() public static method

public static ProjectsFolder ( string serverName ) : string
serverName string
return string
Ejemplo n.º 1
0
        private static AdjacencyGraph <string, Edge <string> > BuildReferencesGraph(out Dictionary <string, string> servers)
        {
            servers = new Dictionary <string, string>();

            var graph = new AdjacencyGraph <string, Edge <string> >();

            foreach (var serverName in Args.ServerNames.Split('|'))
            {
                var projectsPath = Paths.ProjectsFolder(serverName);
                foreach (var projectFolder in Directory.GetDirectories(projectsPath))
                {
                    var projectName      = Path.GetFileName(projectFolder);
                    var referencesFolder = Path.Combine(projectFolder, Args.ReferencesFolder);

                    servers.Add(projectName, serverName);

                    if (!Directory.Exists(referencesFolder))
                    {
                        continue;
                    }

                    var referenceFiles = Directory.GetFiles(referencesFolder).Select(Path.GetFileNameWithoutExtension);

                    graph.AddVerticesAndEdgeRange(referenceFiles.Select(referenceName => new Edge <string>(referenceName, projectName)));
                }
            }

            return(graph);
        }
Ejemplo n.º 2
0
        private static void NotifyProject(string projectName, string serverName)
        {
            var projectsPath     = Paths.ProjectsFolder(serverName);
            var projectFolder    = Path.Combine(projectsPath, projectName);
            var referencesFolder = Path.Combine(projectFolder, Args.ReferencesFolder);

            var fileName = String.Format("{0}.txt", Args.ProjectName);
            var filePath = Path.Combine(referencesFolder, fileName);

            File.WriteAllText(filePath, String.Format("Updated on {0}", DateTime.Now.ToDetailedString()));

            Console.WriteLine("{0}: {1}", serverName, projectName);
        }