protected async Task <CheckedReferences <ProjectGroupResource> > CheckProjectGroup(ReferenceDataItem projectGroup) { Log.Debug("Checking that the Project Group exist"); var dependencies = new CheckedReferences <ProjectGroupResource>(); var group = await Repository.ProjectGroups.FindByName(projectGroup.Name).ConfigureAwait(false); dependencies.Register(projectGroup.Name, projectGroup.Id, group); return(dependencies); }
protected CheckedReferences <LifecycleResource> CheckChannelLifecycles(List <ReferenceDataItem> channelLifecycles) { Log.Debug("Checking that all channel lifecycles exist"); var dependencies = new CheckedReferences <LifecycleResource>(); foreach (var channelLifecycle in channelLifecycles) { var lifecycle = Repository.Lifecycles.FindOne(lc => lc.Name == channelLifecycle.Name); dependencies.Register(channelLifecycle.Name, channelLifecycle.Id, lifecycle); } return(dependencies); }
protected CheckedReferences <EnvironmentResource> CheckEnvironmentsExist(List <ReferenceDataItem> environmentList) { Log.Debug("Checking that all environments exist"); var dependencies = new CheckedReferences <EnvironmentResource>(); foreach (var env in environmentList) { var environment = Repository.Environments.FindByName(env.Name); dependencies.Register(env.Name, env.Id, environment); } return(dependencies); }
protected CheckedReferences <MachineResource> CheckMachinesExist(List <ReferenceDataItem> machineList) { Log.Debug("Checking that all machines exist"); var dependencies = new CheckedReferences <MachineResource>(); foreach (var m in machineList) { var machine = Repository.Machines.FindByName(m.Name); dependencies.Register(m.Name, m.Id, machine); } return(dependencies); }
protected CheckedReferences <ActionTemplateResource> CheckActionTemplates(List <ReferenceDataItem> actionTemplates) { Log.Debug("Checking that all Action Templates exist"); var dependencies = new CheckedReferences <ActionTemplateResource>(); foreach (var actionTemplate in actionTemplates) { var template = actionTemplateRepository.FindByName(actionTemplate.Name); dependencies.Register(actionTemplate.Name, actionTemplate.Id, template); } return(dependencies); }
protected CheckedReferences <FeedResource> CheckNuGetFeedsExist(List <ReferenceDataItem> nugetFeeds) { Log.Debug("Checking that all NuGet Feeds exist"); var dependencies = new CheckedReferences <FeedResource>(); foreach (var nugetFeed in nugetFeeds) { var feed = Repository.Feeds.FindByName(nugetFeed.Name); dependencies.Register(nugetFeed.Name, nugetFeed.Id, feed); } return(dependencies); }
protected async Task <CheckedReferences <LibraryVariableSetResource> > CheckLibraryVariableSets(List <ReferenceDataItem> libraryVariableSets) { Log.Debug("Checking that all Library Variable Sets exist"); var dependencies = new CheckedReferences <LibraryVariableSetResource>(); var allVariableSets = await Repository.LibraryVariableSets.FindAll().ConfigureAwait(false); foreach (var libraryVariableSet in libraryVariableSets) { var variableSet = allVariableSets.Find(avs => avs.Name == libraryVariableSet.Name); dependencies.Register(libraryVariableSet.Name, libraryVariableSet.Id, variableSet); } return(dependencies); }
protected async Task <CheckedReferences <WorkerPoolResource> > CheckWorkerPoolsExist(List <ReferenceDataItem> poolList) { Log.Debug("Checking that all worker pools exist"); var dependencies = new CheckedReferences <WorkerPoolResource>(); foreach (var p in poolList) { var pool = await Repository.WorkerPools.FindByName(p.Name).ConfigureAwait(false); dependencies.Register(p.Name, p.Id, pool); } return(dependencies); }
protected async Task <CheckedReferences <FeedResource> > CheckNuGetFeedsExist(List <ReferenceDataItem> nugetFeeds) { Log.Debug("Checking that all NuGet Feeds exist"); var dependencies = new CheckedReferences <FeedResource>(); foreach (var nugetFeed in nugetFeeds) { FeedResource feed = null; if (FeedCustomExpressionHelper.IsRealFeedId(nugetFeed.Id)) { feed = await Repository.Feeds.FindByName(nugetFeed.Name).ConfigureAwait(false); } else { feed = FeedCustomExpressionHelper.CustomExpressionFeedWithId(nugetFeed.Id); } dependencies.Register(nugetFeed.Name, nugetFeed.Id, feed); } return(dependencies); }