Exemple #1
0
 private static async Task DoWorkAsync(RepositoryInfo info)
 {
 }
Exemple #2
0
 public RepositoryInfoViewModel(RepositoryInfo model)
 {
     _model = model;
 }
Exemple #3
0
        public static void Generate(RepositoryInfo info)
        {
            _total   = 27;
            _current = 0;

            RootDirectory = Path.Combine(info.WorkingDirectory, info.RepositoryName);

            if (Directory.Exists(RootDirectory))
            {
                Directory.Delete(RootDirectory, true);
            }

            Thread.Sleep(1000);
            CreateDirectories(RootDirectory,
                              ".github",
                              "build\\strong name keys",
                              "build\\rulesets",
                              "docs",
                              "src\\lib",
                              "src\\ConsoleTester\\Properties",
                              "tools");
            DownloadFile(".editorconfig");
            DownloadFile(".gitignore");
            DownloadFile(".tfignore");
            DownloadFile("build.cmd");
            DownloadFile("clean.cmd");
            DownloadFile("License.txt");
            DownloadFile("packages.cmd");
            DownloadFile("Packages.props");
            DownloadFile("readme.md");
            DownloadFile("rebuild.cmd");
            DownloadFile("restore.cmd");
            DownloadFile("shell.cmd");
            DownloadFile(@"build\rulesets\SolutionRules.ruleset");
            DownloadFile(@"build\strong name keys\35MSSharedLib1024.snk");
            DownloadFile(@"build\strong name keys\SolutionKey.snk");
            DownloadFile(@"docs\ContributorCovenant.md");
            DownloadFile(@"src\Directory.Build.props");
            DownloadFile(@"src\Directory.Build.targets");
            DownloadFile(@"src\nuget.config");
            DownloadFile(@"src\SolutionFile.sln", $"src\\{info.RepositoryName}.sln");
            DownloadFile(@"src\ConsoleTester\ConsoleTester.csproj");
            DownloadFile(@"src\ConsoleTester\Program.cs");
            DownloadFile(@"src\ConsoleTester\Properties\launchSettings.json");
            DownloadFile(@"tools\Microsoft.Extensions.CommandLineUtils.dll");
            DownloadFile(@"tools\Newtonsoft.Json.dll");
            DownloadFile(@"tools\Packages.props");
            DownloadFile(@"tools\RepositoryUtility.exe");
            if (info.StartProgram == StartProgram.VisualStudio)
            {
                Process.Start(Path.Combine(RootDirectory, $"src\\{info.RepositoryName}.sln"));
            }
            else if (info.StartProgram == StartProgram.Explorer)
            {
                ProcessStartInfo startInfo =
                    new ProcessStartInfo
                {
                    FileName         = "C:\\Windows\\Explorer.exe",
                    WorkingDirectory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location),
                    Arguments        = RootDirectory,
                    WindowStyle      = ProcessWindowStyle.Normal
                };
                Process p = new Process
                {
                    StartInfo = startInfo
                };
                p.Start();
            }
        }