public static YamlDeploymentAction FromModel(DeploymentAction model)
 {
     return(new YamlDeploymentAction
     {
         Name = model.Name,
         ActionType = model.ActionType,
         Properties = YamlPropertyValue.FromModel(model.Properties),
         EnvironmentRefs = model.EnvironmentRefs.Select(r => r.Name).ToArray().NullIfEmpty()
     });
 }
 public DeploymentAction ToModel()
 {
     return(new DeploymentAction(
                Name,
                ActionType,
                YamlPropertyValue.ToModel(Properties),
                EnvironmentRefs.EnsureNotNull().Select(name => new ElementReference(name)),
                ChannelRefs.EnsureNotNull().Select(name => new ElementReference(name))
                ));
 }
Esempio n. 3
0
 public static YamlDeploymentStep FromModel(DeploymentStep model)
 {
     return(new YamlDeploymentStep
     {
         Name = model.Name,
         Condition = model.Condition,
         StartTrigger = model.StartTrigger,
         RequiresPackagesToBeAcquired = model.RequiresPackagesToBeAcquired,
         Properties = YamlPropertyValue.FromModel(model.Properties),
         Actions = model.Actions.Select(YamlDeploymentAction.FromModel).ToArray()
     });
 }
Esempio n. 4
0
 public DeploymentStep ToModel()
 {
     return(new DeploymentStep(Name, Condition, RequiresPackagesToBeAcquired, StartTrigger, YamlPropertyValue.ToModel(Properties), Actions.Select(a => a.ToModel())));
 }