This repository was archived by the owner on Jun 21, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +14
-5
lines changed
Expand file tree Collapse file tree 5 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,11 @@ protected override async Task InitializeAsync(CancellationToken cancellationToke
5757 async Task InitializeMenus ( )
5858 {
5959 var menus = await GetServiceAsync ( typeof ( IMenuProvider ) ) as IMenuProvider ;
60+ if ( menus == null )
61+ {
62+ // Ignore if null because Expression Blend doesn't support custom services or menu extensibility.
63+ return ;
64+ }
6065
6166 await ThreadingHelper . SwitchToMainThreadAsync ( ) ;
6267
Original file line number Diff line number Diff line change 1- using GitHub . Services ;
1+ using GitHub . Exports ;
2+ using GitHub . Services ;
23using System . Collections . Generic ;
34using System . Collections . ObjectModel ;
45using System . ComponentModel . Composition ;
@@ -14,7 +15,7 @@ namespace GitHub.VisualStudio.Menus
1415 /// redirects every request to the actual service, and can be
1516 /// thrown away as soon as the caller is done (no state is kept)
1617 /// </summary>
17- [ Export ( typeof ( IMenuProvider ) ) ]
18+ [ ExportForProcess ( typeof ( IMenuProvider ) , "devenv" ) ]
1819 [ PartCreationPolicy ( CreationPolicy . NonShared ) ]
1920 public class MenuProviderDispatcher : IMenuProvider
2021 {
Original file line number Diff line number Diff line change 1111using System . Reactive . Linq ;
1212using GitHub . Infrastructure ;
1313using GitHub . Models ;
14+ using GitHub . Exports ;
1415using GitHub . Services ;
1516using GitHub . UI ;
1617using Microsoft . VisualStudio . ComponentModelHost ;
@@ -28,7 +29,7 @@ namespace GitHub.VisualStudio
2829 /// redirects every request to the actual service, and can be
2930 /// thrown away as soon as the caller is done (no state is kept)
3031 /// </summary>
31- [ Export ( typeof ( IGitHubServiceProvider ) ) ]
32+ [ ExportForProcess ( typeof ( IGitHubServiceProvider ) , "devenv" ) ]
3233 [ PartCreationPolicy ( CreationPolicy . NonShared ) ]
3334 [ NullGuard ( ValidationFlags . None ) ]
3435 public class GitHubProviderDispatcher : IGitHubServiceProvider
Original file line number Diff line number Diff line change 22using System . ComponentModel . Composition ;
33using System . Threading . Tasks ;
44using GitHub . Api ;
5+ using GitHub . Exports ;
56using GitHub . Primitives ;
67using Microsoft . VisualStudio . Shell ;
78using Octokit ;
89using Task = System . Threading . Tasks . Task ;
910
1011namespace GitHub . Services
1112{
12- [ Export ( typeof ( ILoginManager ) ) ]
13+ [ ExportForProcess ( typeof ( ILoginManager ) , "devenv" ) ]
1314 [ PartCreationPolicy ( CreationPolicy . NonShared ) ]
1415 public class LoginManagerDispatcher : ILoginManager
1516 {
Original file line number Diff line number Diff line change 22using System ;
33using System . ComponentModel . Composition ;
44using Task = System . Threading . Tasks . Task ;
5+ using GitHub . Exports ;
56
67namespace GitHub . Services
78{
8- [ Export ( typeof ( IUsageTracker ) ) ]
9+ [ ExportForProcess ( typeof ( IUsageTracker ) , "devenv" ) ]
910 [ PartCreationPolicy ( CreationPolicy . NonShared ) ]
1011 public class UsageTrackerDispatcher : IUsageTracker
1112 {
You can’t perform that action at this time.
0 commit comments