Beispiel #1
0
        private void ApplyStashToStage(IStashEntry stash, bool replace)
        {
            if (replace)
            {
                stage.Clear();
            }

            stage.SetLobby(stash.GetLobby());
            stage.Add(stash);
        }
Beispiel #2
0
        private ICommandResult Add(CommandContext context)
        {
            var beforeProjects = stage.GetProjects();

            stage.Add(context.GetParameterValues(ParameterKeys.PATH));
            var afterProjects = stage.GetProjects();
            var newProjects   = afterProjects.RemoveAll(beforeProjects);

            if (newProjects.Count < 1)
            {
                return(new TextResult("No project has been added."));
            }

            return(new ItemsResult(BuildProjectItems(newProjects).ToImmutableList()));
        }
Beispiel #3
0
        private ICommandResult Add(CommandContext context)
        {
            var beforePaths = stage.GetPaths();

            foreach (TexoPath path in context.GetParameterPaths())
            {
                stage.Add(path.GetItems());
            }

            var afterPaths = stage.GetPaths();
            var newPaths   = afterPaths.RemoveAll(beforePaths);

            if (newPaths.IsNullOrEmpty())
            {
                return(new TextResult("No new path has been added to the stage."));
            }

            return(new ItemsResult(BuildStageItem(stage.GetLobby(), newPaths, "Added to the stage")));
        }
 public StageDTO Post(int theaterId, [FromBody] StageBindingModel stage)
 {
     return(_stageService.Add(theaterId, stage));
 }