Exemplo n.º 1
0
		private void populateDeploymentGrid(IDeploymentRepository repository)
		{
			var rowFactory = ObjectFactory.GetInstance<IDeploymentRowFactory>();

			grdDeployments.Rows.Clear();

			var deployments = repository.Find(SelectedApplication.Name, SelectedEnvironment.Name);

			var rowNumber = 0;
			foreach (var deployment in deployments)
			{
				string[] deploymentRow = rowFactory.ConstructRow(deployment);
				grdDeployments.Rows.Add(deploymentRow);

				if (deployment.Result == DeploymentResult.Failure)
				{
					grdDeployments.Rows[rowNumber].DefaultCellStyle.BackColor = Color.Pink;
				}

				rowNumber++;
			}
		}
Exemplo n.º 2
0
        private void populateDeploymentGrid(IDeploymentRepository repository)
        {
            var rowFactory = ObjectFactory.GetInstance <IDeploymentRowFactory>();

            grdDeployments.Rows.Clear();

            var deployments = repository.Find(SelectedApplication.Name, SelectedEnvironment.Name);

            var rowNumber = 0;

            foreach (var deployment in deployments)
            {
                string[] deploymentRow = rowFactory.ConstructRow(deployment);
                grdDeployments.Rows.Add(deploymentRow);

                if (deployment.Result == DeploymentResult.Failure)
                {
                    grdDeployments.Rows[rowNumber].DefaultCellStyle.BackColor = Color.Pink;
                }

                rowNumber++;
            }
        }
        public async Task <IActionResult> GetAsync(long key)
        {
            var deployment = await DeploymentRepository.Find(key);

            return(Ok(Mapper.Map <DeploymentDTO>(deployment)));
        }