Esempio n. 1
0
        public PullRequestViewModel(IFeaturesService featuresService)
        {
            _featuresService = featuresService;

            this.Bind(x => x.PullRequest, true).IsNotNull().Select(x => string.Equals(x.State, "closed")).Subscribe(x => IsClosed = x);
            GoToOwner = ReactiveUI.ReactiveCommand.Create(this.Bind(x => x.Issue, true).Select(x => x != null));
            GoToOwner.Subscribe(_ => ShowViewModel <UserViewModel>(new UserViewModel.NavObject {
                Username = Issue?.User?.Login
            }));
        }
Esempio n. 2
0
        public IssueViewModel(IApplicationService applicationService, IFeaturesService featuresService)
        {
            _applicationService = applicationService;
            _featuresService    = featuresService;
            this.Bind(x => x.Issue, true).Where(x => x != null).Select(x => string.Equals(x.State, "closed")).Subscribe(x => IsClosed = x);

            GoToOwner = ReactiveUI.ReactiveCommand.Create(this.Bind(x => x.Issue, true).Select(x => x != null));
            GoToOwner.Subscribe(_ => ShowViewModel <UserViewModel>(new UserViewModel.NavObject {
                Username = Issue?.User?.Login
            }));
        }