コード例 #1
0
 public IRelease ReadRelease(string id)
 {
     using (var service = DataLocator.GetPersistenceService())
     {
         return(service.Object.Read <IRelease>(id));
     }
 }
コード例 #2
0
 public IDeployment ReadDeployment(string id)
 {
     using (var service = DataLocator.GetPersistenceService())
     {
         return(service.Object.Read <IDeployment>(id));
     }
 }
コード例 #3
0
 public void CreateConfiguration(string id, IConfiguration configuration)
 {
     using (var service = DataLocator.GetPersistenceService())
     {
         service.Object.Create(id, configuration);
     }
 }
コード例 #4
0
 public void CreateDeploymentStep(string deploymentName, IDeploymentStep deploymentStep)
 {
     using (var service = DataLocator.GetPersistenceService())
     {
         service.Object.Create(deploymentName + " Step" + deploymentStep.Id, deploymentStep);
     }
 }
コード例 #5
0
 public void CreateDeployment(IDeployment deployment)
 {
     using (var service = DataLocator.GetPersistenceService())
     {
         service.Object.Create(deployment.Name, deployment);
     }
 }
コード例 #6
0
 public void DeleteRelease(IRelease release)
 {
     using (var service = DataLocator.GetPersistenceService())
     {
         service.Object.Delete(release.Version, release);
     }
 }
コード例 #7
0
 public IConfiguration ReadConfiguration(string id)
 {
     using (var service = DataLocator.GetPersistenceService())
     {
         return(service.Object.Read <IConfiguration>(id));
     }
 }
コード例 #8
0
        public IEnumerable <string> ReadReleaseVersions()
        {
            var list = new List <string>();

            using (var service = DataLocator.GetPersistenceService())
            {
                foreach (var id in service.Object.List <IRelease>())
                {
                    list.Add(id);
                }
            }
            return(list.OrderBy(s => s).ToList());
        }
コード例 #9
0
        public IList <IDeployment> ReadDeployments()
        {
            var list = new List <IDeployment>();

            using (var service = DataLocator.GetPersistenceService())
            {
                foreach (var id in service.Object.List <IDeployment>())
                {
                    var deployment = service.Object.Read <IDeployment>(id);
                    list.Add(deployment);
                }
            }
            return(list.OrderBy(s => s.DueDate).ToList());
        }
コード例 #10
0
        public IList <IRelease> ReadReleases()
        {
            var list = new List <IRelease>();

            using (var service = DataLocator.GetPersistenceService())
            {
                foreach (var id in service.Object.List <IRelease>())
                {
                    var release = service.Object.Read <IRelease>(id);
                    list.Add(release);
                }
            }
            return(list.OrderBy(s => s.DueDate).ToList());
        }
コード例 #11
0
        public IEnumerable <IDeploymentStep> ReadDeploymentSteps(string deploymentName)
        {
            using (var service = DataLocator.GetPersistenceService())
            {
                var list = service.Object.List <IDeploymentStep>(deploymentName).OrderBy(s => s.Id).ToList();
                //Activate next Step
                //ToDo: create separate service for StepState control
                foreach (var deploymentStep in list)
                {
                    if (deploymentStep.StepState == DeploymentStepState.Active)
                    {
                        break;
                    }

                    if (deploymentStep.StepState == DeploymentStepState.Init)
                    {
                        deploymentStep.StepState = DeploymentStepState.Active;
                        break;
                    }
                }
                return(list);
            }
        }