private static void AddInstallationSummaries() { AllInstallationSummaries = new List <InstallationSummary>(); List <Application> allApps = new List <Application>(ApplicationLogic.GetAll(true)); List <ApplicationServer> allServers = new List <ApplicationServer>(ApplicationServerLogic.GetAll(true)); ApplicationWithOverrideVariableGroup appWithGroup; DateTime originalStartTime = DateTime.Now.AddDays(-1); int totalOuterLoops = TotalNumberOfInstallationSummaries / TotalNumberOfEachEntityToCreate; int runningTotal = 1; // Count of total summaries overall for (int i = 1; i <= totalOuterLoops; i++) { for (int x = 0; x < TotalNumberOfEachEntityToCreate - 1; x++) // We use "- 1" here so we have some entities without an installation summary (for testing) { appWithGroup = new ApplicationWithOverrideVariableGroup() { Application = allApps[x], ApplicationId = allApps[x].Id }; DateTime startTime = originalStartTime.AddMinutes(runningTotal); InstallationSummary summary = new InstallationSummary(appWithGroup, allServers[x], startTime); summary.InstallationEnd = startTime.AddSeconds(4); summary.InstallationResult = InstallationResult.Success; AllInstallationSummaries.Add(summary); InstallationSummaryLogic.Save(summary); runningTotal++; } } }
public IEnumerable <ApplicationServer> GetAllServers(bool includeArchivedApps) { return(Invoke(() => ApplicationServerLogic.GetAll(includeArchivedApps))); }