Exemplo n.º 1
0
 internal FeedbackItemViewModel(Octokit.Issue issue, Action gotoAction)
 {
     Title         = issue.Title;
     ImageUrl      = issue.User.AvatarUrl;
     Created       = issue.CreatedAt;
     CreatedString = Created.Humanize();
     GoToCommand   = ReactiveCommand.Create().WithSubscription(_ => gotoAction());
 }
Exemplo n.º 2
0
 internal FeedbackItemViewModel(string repositoryOwner, string repositoryName, Octokit.Issue issue)
 {
     RepositoryOwner = repositoryOwner;
     RepositoryName  = repositoryName;
     IssueId         = issue.Number;
     Title           = issue.Title;
     ImageUrl        = issue.User.AvatarUrl;
     Created         = issue.CreatedAt;
     CreatedString   = Created.Humanize();
 }
Exemplo n.º 3
0
 internal EventItemViewModel(
     EventModel eventModel,
     IReadOnlyCollection <BaseEventsViewModel.TextBlock> headerBlocks,
     IReadOnlyCollection <BaseEventsViewModel.TextBlock> bodyBlocks)
 {
     Event         = eventModel;
     HeaderBlocks  = headerBlocks ?? new BaseEventsViewModel.TextBlock[0];
     BodyBlocks    = bodyBlocks ?? new BaseEventsViewModel.TextBlock[0];
     GoToCommand   = ReactiveCommand.Create();
     Avatar        = eventModel.Actor != null ? new GitHubAvatar(eventModel.Actor.AvatarUrl) : GitHubAvatar.Empty;
     Created       = eventModel.CreatedAt;
     Type          = ChooseImage(eventModel);
     CreatedString = Created.Humanize();
 }