コード例 #1
0
ファイル: CafeController.cs プロジェクト: saida-sghaier/cafe
        private static GenericProductJobRunner CreateJobRunner()
        {
            const string product       = "cafe";
            var          commands      = new FileSystemCommandsBoundary();
            var          fileSystem    = new FileSystem(new EnvironmentBoundary(), commands);
            var          resolver      = new CafeDownloadUrlResolver(FindRuntimeIdentifier(commands));
            var          cafeInstaller = new CafeInstaller(commands, resolver, ServerSettings.Instance.UpdaterDirectory);

            return(new GenericProductJobRunner(StructureMapResolver.Container.GetInstance <JobRunner>(),
                                               InspecController.CreateDownloadJob(fileSystem, product, resolver),
                                               InspecController.CreateInstallJob(cafeInstaller)));
        }
コード例 #2
0
        private static ChefJobRunner CreateChefJobRunner()
        {
            var          commands   = new FileSystemCommandsBoundary();
            var          fileSystem = new FileSystem(new EnvironmentBoundary(), commands);
            const string prefix     = "chef-client";
            var          product    = "chef";

            return(new ChefJobRunner(StructureMapResolver.Container.GetInstance <JobRunner>(),
                                     InspecController.CreateDownloadJob(fileSystem, product, prefix, "2012r2"),
                                     InspecController.CreateInstallJob(product, fileSystem, commands, prefix, InstalledProductsFinder.IsChefClient),
                                     StructureMapResolver.Container.GetInstance <RunChefJob>()));
        }