public static ProjectTrigger ToModel(this ProjectTriggerResource resource, IOctopusRepository repository) { return(new ProjectTrigger( new ElementIdentifier(resource.Name), resource.Filter.ToModel(repository), resource.Action.ToModel())); }
public static ProjectTriggerResource UpdateWith(this ProjectTriggerResource resource, ProjectTrigger model, string projectResourceId, IOctopusRepository repository) { resource.ProjectId = projectResourceId; resource.Name = model.Name; resource.Type = (ProjectTriggerType)model.Type; UpdateProjectTriggerProperties(resource.Properties, model.Properties, repository); return(resource); }
public static ProjectTriggerResource UpdateWith(this ProjectTriggerResource resource, ProjectTrigger model, string projectResourceId, IOctopusRepository repository) { resource.ProjectId = projectResourceId; resource.Name = model.Identifier.Name; resource.Filter = model.Filter.FromModel(repository); resource.Action = model.Action.FromModel(); return(resource); }
public static ProjectTrigger ToModel(this ProjectTriggerResource resource, IOctopusRepository repository) { return(new ProjectTrigger(resource.Name, (ProjectTrigger.ProjectTriggerType)resource.Type, ToProjectTriggerProperties(resource.Properties, repository))); }