private static IQuickActionFileFilter GetCreatedOnFilter(IIssueDecisionViewModel decision) { var createdOn = decision.Issue.File.FileCreatedOn.Date; return(new DelegateQuickActionFileFilter($"created on \"{createdOn:d}\"", list => list.Where(x => x.Decision.Issue.File.FileCreatedOn.Date == createdOn))); }
private static IEnumerable <IQuickActionFileFilter> GetDecisionFilters(IIssueDecisionViewModel decision) { yield return(GetFileLocationFilter(decision)); if (decision is InvalidLocationFileDecisionViewModel invalidLocationIssue) { yield return(GetTargetPathFilter(invalidLocationIssue)); } yield return(GetCreatedOnFilter(decision)); }
private static IQuickActionFileFilter GetFileLocationFilter(IIssueDecisionViewModel decision) { var directory = Path.GetDirectoryName(decision.Issue.File.Filename); var displayDirectory = Path.GetDirectoryName(decision.Issue.File.RelativeFilename ?? decision.Issue.File.Filename); if (displayDirectory == string.Empty) { displayDirectory = "/"; } return(new DelegateQuickActionFileFilter($"from \"{displayDirectory}\"", list => list.Where(x => Path.GetDirectoryName(x.Decision.Issue.File.Filename) == directory))); }
public IssueDecisionWrapperViewModel(IIssueDecisionViewModel decision) { Decision = decision; IsDeleteDecision = decision is DeleteFilesDecisionViewModel; }