Skip to content
This repository was archived by the owner on Oct 16, 2020. It is now read-only.

Commit fa82ddd

Browse files
committed
Merge pull request #503 from dr-BEat/master
Correctly handle ServiceCreatorCallback in GetFutureService
2 parents 96d4ed3 + 0666245 commit fa82ddd

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/Main/Base/Project/Util/SharpDevelopServiceContainer.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,8 @@ public Task<T> GetFutureService<T>()
161161
{
162162
Type serviceType = typeof(T);
163163
lock (services) {
164-
object instance;
165-
if (services.TryGetValue(serviceType, out instance)) {
166-
return Task.FromResult((T)instance);
164+
if (services.ContainsKey(serviceType)) {
165+
return Task.FromResult((T)GetService(serviceType));
167166
} else {
168167
object taskCompletionSource;
169168
if (taskCompletionSources.TryGetValue(serviceType, out taskCompletionSource)) {

0 commit comments

Comments
 (0)