Beispiel #1
0
        public void InstallApplication(ApplicationServer server, ApplicationWithOverrideVariableGroup appWithGroup)
        {
            if (appWithGroup == null)
            {
                throw new ArgumentNullException("appWithGroup");
            }

            DateTime installationStartTime = DateTime.Now;

            var installationSummary = new InstallationSummary(appWithGroup, server, installationStartTime);

            HydrateTaskApps(appWithGroup);

            InstallationResultContainer resultContainer = appWithGroup.Install(server, installationStartTime, true);

            installationSummary.SetResults(resultContainer, DateTime.Now);

            LogAndSaveInstallationSummary(installationSummary);
        }
Beispiel #2
0
        private static void CreateInstallationSummaries(Application app, ApplicationServer server, int numberOfInstallationSummariesToCreate)
        {
            DateTime originalStartTime = DateTime.Now.AddDays(-1);

            for (int x = 0; x < numberOfInstallationSummariesToCreate; x++)
            {
                var appWithGroup = new ApplicationWithOverrideVariableGroup()
                {
                    Application = app, ApplicationId = app.Id
                };
                DateTime startTime = originalStartTime.AddMinutes(x);

                InstallationSummary summary = new InstallationSummary(appWithGroup, server, startTime);

                var resultContainer = new InstallationResultContainer();
                resultContainer.InstallationResult = InstallationResult.Success;

                summary.SetResults(resultContainer, startTime.AddSeconds(4));

                InstallationSummaryLogic.Save(summary);
            }
        }