Пример #1
0
 public IObservable <IReadOnlyList <CommitMessage> > GetMessagesForUniqueCommits(
     ILocalRepositoryModel repository,
     string baseBranch,
     string compareBranch,
     int maxCommits)
 {
     return(Observable.Defer(() =>
     {
         var repo = gitService.GetRepository(repository.LocalPath);
         return gitClient.GetMessagesForUniqueCommits(repo, baseBranch, compareBranch, maxCommits).ToObservable();
     }));
 }
Пример #2
0
 public IObservable <IReadOnlyList <CommitMessage> > GetMessagesForUniqueCommits(
     ILocalRepositoryModel repository,
     string baseBranch,
     string compareBranch,
     int maxCommits)
 {
     return(Observable.Defer(async() =>
     {
         // CommitMessage doesn't keep a reference to Repository
         using (var repo = gitService.GetRepository(repository.LocalPath))
         {
             var messages = await gitClient.GetMessagesForUniqueCommits(repo, baseBranch, compareBranch, maxCommits);
             return Observable.Return(messages);
         }
     }));
 }