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

Commit cc6a112

Browse files
committed
Move VSGitExtPart into VSGitExtDispatcher
1 parent f3865b1 commit cc6a112

File tree

3 files changed

+20
-15
lines changed

3 files changed

+20
-15
lines changed

src/GitHub.VisualStudio/GitHub.VisualStudio.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,7 @@
328328
<Compile Include="Services\UsageTracker.cs" />
329329
<Compile Include="Services\LoginManagerDispatcher.cs" />
330330
<Compile Include="Services\UsageTrackerDispatcher.cs" />
331+
<Compile Include="Services\VSGitExtDispatcher.cs" />
331332
<Compile Include="Settings\Constants.cs" />
332333
<Compile Include="Services\ConnectionManager.cs" />
333334
<Compile Include="Services\Program.cs" />

src/GitHub.VisualStudio/GitHubPackage.cs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -112,21 +112,6 @@ public GHClient(IProgram program)
112112
}
113113
}
114114

115-
[PartCreationPolicy(CreationPolicy.Shared)]
116-
public class VSGitExtPart
117-
{
118-
readonly IGitHubServiceProvider serviceProvider;
119-
120-
[ImportingConstructor]
121-
public VSGitExtPart(IGitHubServiceProvider serviceProvider)
122-
{
123-
this.serviceProvider = serviceProvider;
124-
}
125-
126-
[Export(typeof(IVSGitExt))]
127-
public IVSGitExt VSGitExt => serviceProvider.GetService<IVSGitExt>();
128-
}
129-
130115
[PackageRegistration(UseManagedResourcesOnly = true, AllowsBackgroundLoading = true)]
131116
[ProvideService(typeof(ILoginManager), IsAsyncQueryable = true)]
132117
[ProvideService(typeof(IMenuProvider), IsAsyncQueryable = true)]
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
using System.ComponentModel.Composition;
2+
3+
namespace GitHub.Services
4+
{
5+
[PartCreationPolicy(CreationPolicy.Shared)]
6+
public class VSGitExtDispatcher
7+
{
8+
readonly IGitHubServiceProvider serviceProvider;
9+
10+
[ImportingConstructor]
11+
public VSGitExtDispatcher(IGitHubServiceProvider serviceProvider)
12+
{
13+
this.serviceProvider = serviceProvider;
14+
}
15+
16+
[Export(typeof(IVSGitExt))]
17+
public IVSGitExt VSGitExt => serviceProvider.GetService<IVSGitExt>();
18+
}
19+
}

0 commit comments

Comments
 (0)