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

Commit e9f0c17

Browse files
committed
Convert PullRequestStatusPackage to an AsyncPackage
1 parent 4ce0d65 commit e9f0c17

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/GitHub.InlineReviews/PullRequestStatusPackage.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
11
using System;
2+
using System.Threading;
23
using System.Runtime.InteropServices;
34
using Microsoft.VisualStudio.Shell;
45
using Microsoft.VisualStudio.ComponentModelHost;
56
using GitHub.VisualStudio;
67
using GitHub.InlineReviews.Services;
8+
using Task = System.Threading.Tasks.Task;
79

810
namespace GitHub.InlineReviews
911
{
1012
[PackageRegistration(UseManagedResourcesOnly = true)]
1113
[Guid(Guids.PullRequestStatusPackageId)]
1214
[ProvideAutoLoad(Guids.GitSccProviderId)]
13-
public class PullRequestStatusPackage : Package
15+
public class PullRequestStatusPackage : AsyncPackage
1416
{
15-
protected override void Initialize()
17+
protected override async Task InitializeAsync(CancellationToken cancellationToken, IProgress<ServiceProgressData> progress)
1618
{
17-
var componentModel = (IComponentModel)GetService(typeof(SComponentModel));
19+
var componentModel = (IComponentModel)await GetServiceAsync(typeof(SComponentModel));
1820
var exportProvider = componentModel.DefaultExportProvider;
1921
var pullRequestStatusManager = exportProvider.GetExportedValue<IPullRequestStatusBarManager>();
2022
pullRequestStatusManager.Initialize();

0 commit comments

Comments
 (0)