public OrganizationRepositoriesViewModel(IApplicationService applicationService)
     : base(applicationService)
 {
     ShowRepositoryOwner = false;
     LoadCommand         = ReactiveCommand.CreateAsyncTask(t =>
                                                           RepositoryCollection.SimpleCollectionLoad(applicationService.Client.Organizations[Name].Repositories.GetAll(), t as bool?));
 }
 public RepositoriesStarredViewModel(IApplicationService applicationService) : base(applicationService)
 {
     Title       = "Starred";
     LoadCommand = ReactiveCommand.CreateAsyncTask(t =>
                                                   RepositoryCollection.SimpleCollectionLoad(
                                                       applicationService.Client.AuthenticatedUser.Repositories.GetStarred(), t as bool?));
 }
 public OrganizationRepositoriesViewModel(IApplicationService applicationService)
     : base(applicationService)
 {
     this.WhenAnyValue(x => x.Name).Subscribe(x => Title = x ?? "Repositories");
     ShowRepositoryOwner = false;
     LoadCommand         = ReactiveCommand.CreateAsyncTask(t =>
                                                           RepositoryCollection.SimpleCollectionLoad(applicationService.Client.Organizations[Name].Repositories.GetAll(), t as bool?));
 }
 public RepositoryForksViewModel(IApplicationService applicationService)
     : base(applicationService)
 {
     LoadCommand = ReactiveCommand.CreateAsyncTask(t =>
     {
         var forks = applicationService.Client.Users[RepositoryOwner].Repositories[RepositoryName].GetForks();
         return(RepositoryCollection.SimpleCollectionLoad(forks, t as bool?));
     });
 }
Esempio n. 5
0
 public UserRepositoriesViewModel(IApplicationService applicationService)
     : base(applicationService)
 {
     ShowRepositoryOwner = false;
     LoadCommand         = ReactiveCommand.CreateAsyncTask(t =>
     {
         var request = string.Equals(applicationService.Account.Username, Username, StringComparison.OrdinalIgnoreCase) ?
                       applicationService.Client.AuthenticatedUser.Repositories.GetAll() :
                       applicationService.Client.Users[Username].Repositories.GetAll();
         return(RepositoryCollection.SimpleCollectionLoad(request, t as bool?));
     });
 }