Example #1
0
 protected internal virtual void SetDeploymentName(string deploymentId, DeploymentBuilderImpl deploymentBuilder,
                                                   CommandContext commandContext)
 {
     if (!ReferenceEquals(deploymentId, null) && (deploymentId.Length > 0))
     {
         IDeploymentManager deploymentManager = commandContext.DeploymentManager;
         DeploymentEntity   deployment        = deploymentManager.FindDeploymentById(deploymentId);
         deploymentBuilder.Deployment.Name = deployment.Name;
     }
 }
Example #2
0
        protected internal virtual IList <ResourceEntity> GetResourcesByDeploymentId(ISet <string> deploymentIds,
                                                                                     CommandContext commandContext)
        {
            List <ResourceEntity> result = new List <ResourceEntity>();

            if (deploymentIds.Count > 0)
            {
                IDeploymentManager deploymentManager = commandContext.DeploymentManager;

                foreach (string deploymentId in deploymentIds)
                {
                    DeploymentEntity deployment = deploymentManager.FindDeploymentById(deploymentId);
                    IDictionary <string, ResourceEntity> resources = deployment.Resources;
                    var values = resources.Values;
                    result.AddRange(values);
                }
            }

            return(result);
        }