public static ProjectServiceDelivery Create(int versionId, string versionName)
            {
                var entity = new ProjectServiceDelivery()
                {
                    ProjectServiceDeliveryId = Guid.NewGuid(),
                    VersionId   = versionId,
                    VersionName = versionName,
                    CreatedBy   = "admin",
                    Status      = EntityStatus.Active
                };

                var validationResult = new DataValidatorManager <ProjectServiceDelivery>().Build().Validate(entity);

                if (!validationResult.IsValid)
                {
                    throw new ApplicationException(validationResult.Errors);
                }

                return(entity);
            }
Esempio n. 2
0
        public void UpdateDeliveryReleaseStatus(int versionId, string versionName, string environmentName, string environmentStatus)
        {
            ProjectServiceDelivery projectServiceDelivery = this.AddOrModifyDelivery(versionId, versionName);

            projectServiceDelivery.UpdateReleaseStatus(environmentName, environmentStatus);
        }
Esempio n. 3
0
        public void AddDeliveryReleaseStarted(int versionId, string versionName, List <DeliveryEnvironmentModel> environments)
        {
            ProjectServiceDelivery projectServiceDelivery = this.AddOrModifyDelivery(versionId, versionName);

            projectServiceDelivery.AddReleaseStarted(environments);
        }
Esempio n. 4
0
        public void AddDeliveryBuildCompleted(int versionId, string versionName, string status, DateTime deliveryDate)
        {
            ProjectServiceDelivery projectServiceDelivery = this.AddOrModifyDelivery(versionId, versionName);

            projectServiceDelivery.UpdateBuildInformation(status, deliveryDate);
        }