@@ -104,7 +104,7 @@ public IObservable<IReadOnlyList<IAccount>> GetAccounts()
104104 . ToReadOnlyList ( Create ) ;
105105 }
106106
107- public IObservable < IRemoteRepositoryModel > GetForks ( IRepositoryModel repository )
107+ public IObservable < RemoteRepositoryModel > GetForks ( RepositoryModel repository )
108108 {
109109 return ApiClient . GetForks ( repository . Owner , repository . Name )
110110 . Select ( x => new RemoteRepositoryModel ( x ) ) ;
@@ -156,7 +156,7 @@ IObservable<IEnumerable<AccountCacheItem>> GetUserOrganizations()
156156 } ) ;
157157 }
158158
159- public IObservable < IReadOnlyList < IRemoteRepositoryModel > > GetRepositories ( )
159+ public IObservable < IReadOnlyList < RemoteRepositoryModel > > GetRepositories ( )
160160 {
161161 return GetUserRepositories ( RepositoryType . Owner )
162162 . TakeLast ( 1 )
@@ -175,7 +175,7 @@ IObservable<AccountCacheItem> GetUserFromCache()
175175 /// <param name="repo"></param>
176176 /// <param name="collection"></param>
177177 /// <returns></returns>
178- public ITrackingCollection < IPullRequestModel > GetPullRequests ( IRepositoryModel repo ,
178+ public ITrackingCollection < IPullRequestModel > GetPullRequests ( RepositoryModel repo ,
179179 ITrackingCollection < IPullRequestModel > collection )
180180 {
181181 // Since the api to list pull requests returns all the data for each pr, cache each pr in its own entry
@@ -215,7 +215,7 @@ public IObservable<IPullRequestModel> GetPullRequest(string owner, string name,
215215 throw new NotImplementedException ( ) ;
216216 }
217217
218- public IObservable < IRemoteRepositoryModel > GetRepository ( string owner , string repo )
218+ public IObservable < RemoteRepositoryModel > GetRepository ( string owner , string repo )
219219 {
220220 var keyobs = GetUserFromCache ( )
221221 . Select ( user => string . Format ( CultureInfo . InvariantCulture , "{0}|{1}|{2}/{3}" , CacheIndex . RepoPrefix , user . Login , owner , repo ) ) ;
@@ -228,7 +228,7 @@ public IObservable<IRemoteRepositoryModel> GetRepository(string owner, string re
228228 . Select ( Create ) ) ) ;
229229 }
230230
231- public ITrackingCollection < IRemoteRepositoryModel > GetRepositories ( ITrackingCollection < IRemoteRepositoryModel > collection )
231+ public ITrackingCollection < RemoteRepositoryModel > GetRepositories ( ITrackingCollection < RemoteRepositoryModel > collection )
232232 {
233233 var keyobs = GetUserFromCache ( )
234234 . Select ( user => string . Format ( CultureInfo . InvariantCulture , "{0}|{1}" , CacheIndex . RepoPrefix , user . Login ) ) ;
@@ -256,7 +256,7 @@ public ITrackingCollection<IRemoteRepositoryModel> GetRepositories(ITrackingColl
256256 return collection ;
257257 }
258258
259- public IObservable < IPullRequestModel > CreatePullRequest ( LocalRepositoryModel sourceRepository , IRepositoryModel targetRepository ,
259+ public IObservable < IPullRequestModel > CreatePullRequest ( LocalRepositoryModel sourceRepository , RepositoryModel targetRepository ,
260260 BranchModel sourceBranch , BranchModel targetBranch ,
261261 string title , string body )
262262 {
@@ -286,7 +286,7 @@ public IObservable<Unit> InvalidateAll()
286286 return hostCache . InvalidateAll ( ) . ContinueAfter ( ( ) => hostCache . Vacuum ( ) ) ;
287287 }
288288
289- public IObservable < string > GetFileContents ( IRepositoryModel repo , string commitSha , string path , string fileSha )
289+ public IObservable < string > GetFileContents ( RepositoryModel repo , string commitSha , string path , string fileSha )
290290 {
291291 return Observable . Defer ( ( ) => Task . Run ( async ( ) =>
292292 {
@@ -305,22 +305,22 @@ public IObservable<string> GetFileContents(IRepositoryModel repo, string commitS
305305 } ) ) ;
306306 }
307307
308- IObservable < IReadOnlyList < IRemoteRepositoryModel > > GetUserRepositories ( RepositoryType repositoryType )
308+ IObservable < IReadOnlyList < RemoteRepositoryModel > > GetUserRepositories ( RepositoryType repositoryType )
309309 {
310310 return Observable . Defer ( ( ) => GetUserFromCache ( ) . SelectMany ( user =>
311311 hostCache . GetAndRefreshObject ( string . Format ( CultureInfo . InvariantCulture , "{0}|{1}:repos" , user . Login , repositoryType ) ,
312312 ( ) => GetUserRepositoriesFromApi ( repositoryType ) ,
313313 TimeSpan . FromMinutes ( 2 ) ,
314314 TimeSpan . FromDays ( 7 ) ) )
315315 . ToReadOnlyList ( Create ) )
316- . Catch < IReadOnlyList < IRemoteRepositoryModel > , KeyNotFoundException > (
316+ . Catch < IReadOnlyList < RemoteRepositoryModel > , KeyNotFoundException > (
317317 // This could in theory happen if we try to call this before the user is logged in.
318318 e =>
319319 {
320320 log . Error ( e ,
321321 "Retrieving {RepositoryType} user repositories failed because user is not stored in the cache" ,
322322 repositoryType ) ;
323- return Observable . Return ( Array . Empty < IRemoteRepositoryModel > ( ) ) ;
323+ return Observable . Return ( Array . Empty < RemoteRepositoryModel > ( ) ) ;
324324 } ) ;
325325 }
326326
@@ -333,14 +333,14 @@ IObservable<IEnumerable<RepositoryCacheItem>> GetUserRepositoriesFromApi(Reposit
333333 . Catch < IEnumerable < RepositoryCacheItem > , Exception > ( _ => Observable . Return ( Enumerable . Empty < RepositoryCacheItem > ( ) ) ) ;
334334 }
335335
336- IObservable < IReadOnlyList < IRemoteRepositoryModel > > GetAllRepositoriesForAllOrganizations ( )
336+ IObservable < IReadOnlyList < RemoteRepositoryModel > > GetAllRepositoriesForAllOrganizations ( )
337337 {
338338 return GetUserOrganizations ( )
339339 . SelectMany ( org => org . ToObservable ( ) )
340340 . SelectMany ( org => GetOrganizationRepositories ( org . Login ) . TakeLast ( 1 ) ) ;
341341 }
342342
343- IObservable < IReadOnlyList < IRemoteRepositoryModel > > GetOrganizationRepositories ( string organization )
343+ IObservable < IReadOnlyList < RemoteRepositoryModel > > GetOrganizationRepositories ( string organization )
344344 {
345345 return Observable . Defer ( ( ) => GetUserFromCache ( ) . SelectMany ( user =>
346346 hostCache . GetAndRefreshObject ( string . Format ( CultureInfo . InvariantCulture , "{0}|{1}|repos" , user . Login , organization ) ,
@@ -349,17 +349,17 @@ IObservable<IReadOnlyList<IRemoteRepositoryModel>> GetOrganizationRepositories(s
349349 TimeSpan . FromMinutes ( 2 ) ,
350350 TimeSpan . FromDays ( 7 ) ) )
351351 . ToReadOnlyList ( Create ) )
352- . Catch < IReadOnlyList < IRemoteRepositoryModel > , KeyNotFoundException > (
352+ . Catch < IReadOnlyList < RemoteRepositoryModel > , KeyNotFoundException > (
353353 // This could in theory happen if we try to call this before the user is logged in.
354354 e =>
355355 {
356356 log . Error ( e , "Retrieveing {Organization} org repositories failed because user is not stored in the cache" ,
357357 organization ) ;
358- return Observable . Return ( Array . Empty < IRemoteRepositoryModel > ( ) ) ;
358+ return Observable . Return ( Array . Empty < RemoteRepositoryModel > ( ) ) ;
359359 } ) ;
360360 }
361361
362- public IObservable < BranchModel > GetBranches ( IRepositoryModel repo )
362+ public IObservable < BranchModel > GetBranches ( RepositoryModel repo )
363363 {
364364 var keyobs = GetUserFromCache ( )
365365 . Select ( user => string . Format ( CultureInfo . InvariantCulture , "{0}|{1}|branch" , user . Login , repo . Name ) ) ;
@@ -403,7 +403,7 @@ IAccount Create(string login, string avatarUrl)
403403 avatarProvider . GetAvatar ( avatarUrl ) ) ;
404404 }
405405
406- IRemoteRepositoryModel Create ( RepositoryCacheItem item )
406+ RemoteRepositoryModel Create ( RepositoryCacheItem item )
407407 {
408408 return new RemoteRepositoryModel (
409409 item . Id ,
0 commit comments