public static QuickAction SetExecute(IssueDecisionWrapperViewModel viewModel) { var execute = viewModel.Execute; var description = GetIssueTitle(execute ? "Execute" : "Don't execute", viewModel.Decision.Issue); return(new QuickAction(viewModel, description, ActionForEveryViewModel(x => x.Execute = execute), GetDecisionFilters(viewModel.Decision).ToList())); }
public QuickAction(IssueDecisionWrapperViewModel source, string description, Action <IEnumerable <IssueDecisionWrapperViewModel> > action, IReadOnlyList <IQuickActionFileFilter> filters) { Source = source; Description = description; Action = action; Filters = filters; }
public static QuickAction Create(IssueDecisionWrapperViewModel viewModel, string actionName, Action <IEnumerable <IssueDecisionWrapperViewModel> > action) { var description = GetIssueTitle(actionName, viewModel.Decision.Issue); return(new QuickAction(viewModel, description, action, GetDecisionFilters(viewModel.Decision).ToList())); }