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

Commit c5b2825

Browse files
author
Steven Kirk
committed
Fix GitHubServiceProvider.GetService<T, Ret>()
GitHubServiceProvider.GetService<T, Ret>() was previously calling `TryGetService<T>` which had the effect of tying to cast the service got as `T` to an instance of `T`, which due to the joys of COM services failed. This was breaking gists. Fixes #770.
1 parent b7d0d31 commit c5b2825

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/GitHub.VisualStudio/Services/GitHubServiceProvider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ public T TryGetService<T>() where T : class
224224
public Ret GetService<T, Ret>() where T : class
225225
where Ret : class
226226
{
227-
return TryGetService<T>() as Ret;
227+
return TryGetService(typeof(T)) as Ret;
228228
}
229229

230230
public void AddService<T>(object owner, T instance) where T : class

0 commit comments

Comments
 (0)