public List<Issue> Search(Project project, Sprint sprint) { var connection = this.youTrackClientFactory.CreateConnection(); var result = connection.Execute<IssueResponce>( new SearchIssueRequest(string.Format("#{0} Fix versions: {1}", project.Name, sprint.Name))); return result.Data.Issue; }
public ProjectDetailsViewModel( Project project, Sprint sprint, Func<Project, Sprint, Person, PersonDetailsViewModel> personDetailsFactory ) { _project = project; Name = _project.Name; PersonDetails = new ObservableCollection<PersonDetailsViewModel>( _project.People.Select(p=>personDetailsFactory(project,sprint,p)) ); }
public CommitsViewModel( Person person, Sprint sprint, SvnCommitRepository commitRepository, Func<SvnCommit, CommitViewModel> commitViewModelFactory ) { this.Commits = new ObservableCollection<CommitViewModel>(); this.ShowHeader = Visibility.Collapsed; commitRepository.ListCommitsObservable(TimeSpan.FromDays(7)).ObserveOnDispatcher().Subscribe( result => { this.Commits.Clear(); foreach (var eventArg in result.Where(r=>r.Author.Contains(person.Login))) { this.Commits.Add(commitViewModelFactory(eventArg)); } ShowHeader = this.Commits.Any() ? Visibility.Visible : Visibility.Collapsed; }); }
public PersonDetailsViewModel(Project project, Sprint sprint, Person person, UserRepository userRepository, IssueRepository issueRepository, Func<IEnumerable<Issue>, IssueStatisticsViewModel> issueStatisticsFactory, Func<Sprint, Person, CommitsViewModel> commitsFactory ) { _userRepository = userRepository; this.issueRepository = issueRepository; _issueStatisticsFactory = issueStatisticsFactory; Person = person; issueRepository.SearchObservable(project, sprint) .Subscribe(r => IssueStatistics = issueStatisticsFactory(r.Where(issue =>issue.Assignee != null && issue.Assignee.Login == person.Login)) ); Commits = commitsFactory(sprint, person); }
public void Select(Sprint sprint) { _shell.Navigate(_projectDetailsFactory(_project,sprint)); }
public IObservable<List<Issue>> SearchObservable(Project project, Sprint sprint) { return this.CacheCallObservable(() => this.Search(project, sprint)); }