Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit 0b48dac

Browse files
authored
Merge branch 'master' into fixes/1448-SharedDictionaryManager-test
2 parents 9ff1078 + 2199169 commit 0b48dac

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

src/GitHub.App/Caches/CacheIndex.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ public static IObservable<CacheIndex> AddAndSaveToIndex(IBlobCache cache, string
6262
Guard.ArgumentNotNull(item, nameof(item));
6363

6464
return cache.GetOrCreateObject(indexKey, () => Create(indexKey))
65+
.Select(x => x.IndexKey == null ? Create(indexKey) : x)
6566
.Do(index =>
6667
{
6768
var k = string.Format(CultureInfo.InvariantCulture, "{0}|{1}", index.IndexKey, item.Key);

src/GitHub.App/Extensions/AkavacheExtensions.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,11 @@ static IObservable<T> GetAndFetchLatestFromIndex<T>(this IBlobCache This,
200200
bool shouldInvalidateOnError = false)
201201
where T : CacheItem
202202
{
203-
var idx = Observable.Defer(() => This.GetOrCreateObject(key, () => CacheIndex.Create(key))).Replay().RefCount();
203+
var idx = Observable.Defer(() => This
204+
.GetOrCreateObject(key, () => CacheIndex.Create(key)))
205+
.Select(x => x.IndexKey == null ? CacheIndex.Create(key) : x)
206+
.Replay()
207+
.RefCount();
204208

205209

206210
var fetch = idx
@@ -264,6 +268,7 @@ public static IObservable<T> PutAndUpdateIndex<T>(this IBlobCache blobCache,
264268
{
265269
var absoluteExpiration = blobCache.Scheduler.Now + maxCacheDuration;
266270
return blobCache.GetOrCreateObject(key, () => CacheIndex.Create(key))
271+
.Select(x => x.IndexKey == null ? CacheIndex.Create(key) : x)
267272
.SelectMany(index => fetchFunc()
268273
.Catch<T, Exception>(Observable.Throw<T>)
269274
.SelectMany(x => x.Save<T>(blobCache, key, absoluteExpiration))

src/GitHub.TeamFoundation.14/Connect/GitHubConnectSection.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,7 @@ async Task RefreshRepositories()
375375

376376
public void DoCreate()
377377
{
378+
ServiceProvider.GitServiceProvider = TEServiceProvider;
378379
var dialogService = ServiceProvider.GetService<IDialogService>();
379380
dialogService.ShowCreateRepositoryDialog(SectionConnection);
380381
}

0 commit comments

Comments
 (0)