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

Commit b95c2ff

Browse files
committed
Rename NavigationService to PullRequestEditorService
Move service class/interface to GitHub.Exports.Reactive project.
1 parent 2450e58 commit b95c2ff

File tree

9 files changed

+86
-11
lines changed

9 files changed

+86
-11
lines changed

src/GitHub.App/GitHub.App.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,6 @@
154154
<Compile Include="Models\PullRequestDetailArgument.cs" />
155155
<Compile Include="Services\EnterpriseCapabilitiesService.cs" />
156156
<Compile Include="Services\GlobalConnection.cs" />
157-
<Compile Include="Services\NavigationService.cs" />
158157
<Compile Include="Services\TeamExplorerContext.cs" />
159158
<Compile Include="Services\OAuthCallbackListener.cs" />
160159
<Compile Include="ViewModels\Dialog\GistCreationViewModel.cs" />

src/GitHub.Exports.Reactive/GitHub.Exports.Reactive.csproj

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,46 @@
5757
<HintPath>..\..\packages\Microsoft.VisualStudio.CoreUtility.14.3.25407\lib\net45\Microsoft.VisualStudio.CoreUtility.dll</HintPath>
5858
<Private>True</Private>
5959
</Reference>
60+
<Reference Include="Microsoft.VisualStudio.Imaging, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
61+
<HintPath>..\..\packages\Microsoft.VisualStudio.Imaging.14.3.25407\lib\net45\Microsoft.VisualStudio.Imaging.dll</HintPath>
62+
<Private>True</Private>
63+
</Reference>
64+
<Reference Include="Microsoft.VisualStudio.OLE.Interop, Version=7.1.40304.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
65+
<HintPath>..\..\packages\Microsoft.VisualStudio.OLE.Interop.7.10.6070\lib\Microsoft.VisualStudio.OLE.Interop.dll</HintPath>
66+
<Private>True</Private>
67+
</Reference>
68+
<Reference Include="Microsoft.VisualStudio.Shell.14.0, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
69+
<HintPath>..\..\packages\Microsoft.VisualStudio.Shell.14.0.14.3.25407\lib\Microsoft.VisualStudio.Shell.14.0.dll</HintPath>
70+
<Private>True</Private>
71+
</Reference>
72+
<Reference Include="Microsoft.VisualStudio.Shell.Immutable.10.0, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
73+
<HintPath>..\..\packages\Microsoft.VisualStudio.Shell.Immutable.10.0.10.0.30319\lib\net40\Microsoft.VisualStudio.Shell.Immutable.10.0.dll</HintPath>
74+
<Private>True</Private>
75+
</Reference>
76+
<Reference Include="Microsoft.VisualStudio.Shell.Immutable.11.0, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
77+
<HintPath>..\..\packages\Microsoft.VisualStudio.Shell.Immutable.11.0.11.0.50727\lib\net45\Microsoft.VisualStudio.Shell.Immutable.11.0.dll</HintPath>
78+
<Private>True</Private>
79+
</Reference>
80+
<Reference Include="Microsoft.VisualStudio.Shell.Immutable.12.0, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
81+
<HintPath>..\..\packages\Microsoft.VisualStudio.Shell.Immutable.12.0.12.0.21003\lib\net45\Microsoft.VisualStudio.Shell.Immutable.12.0.dll</HintPath>
82+
<Private>True</Private>
83+
</Reference>
84+
<Reference Include="Microsoft.VisualStudio.Shell.Immutable.14.0, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
85+
<HintPath>..\..\packages\Microsoft.VisualStudio.Shell.Immutable.14.0.14.3.25407\lib\net45\Microsoft.VisualStudio.Shell.Immutable.14.0.dll</HintPath>
86+
<Private>True</Private>
87+
</Reference>
88+
<Reference Include="Microsoft.VisualStudio.Shell.Interop, Version=7.1.40304.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
89+
<HintPath>..\..\packages\Microsoft.VisualStudio.Shell.Interop.7.10.6071\lib\Microsoft.VisualStudio.Shell.Interop.dll</HintPath>
90+
<Private>True</Private>
91+
</Reference>
92+
<Reference Include="Microsoft.VisualStudio.Shell.Interop.8.0, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
93+
<HintPath>..\..\packages\Microsoft.VisualStudio.Shell.Interop.8.0.8.0.50727\lib\Microsoft.VisualStudio.Shell.Interop.8.0.dll</HintPath>
94+
<Private>True</Private>
95+
</Reference>
96+
<Reference Include="Microsoft.VisualStudio.Shell.Interop.9.0, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
97+
<HintPath>..\..\packages\Microsoft.VisualStudio.Shell.Interop.9.0.9.0.30729\lib\Microsoft.VisualStudio.Shell.Interop.9.0.dll</HintPath>
98+
<Private>True</Private>
99+
</Reference>
60100
<Reference Include="Microsoft.VisualStudio.Text.Data, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
61101
<HintPath>..\..\packages\Microsoft.VisualStudio.Text.Data.14.3.25407\lib\net45\Microsoft.VisualStudio.Text.Data.dll</HintPath>
62102
<Private>True</Private>
@@ -69,6 +109,26 @@
69109
<HintPath>..\..\packages\Microsoft.VisualStudio.Text.UI.14.3.25407\lib\net45\Microsoft.VisualStudio.Text.UI.dll</HintPath>
70110
<Private>True</Private>
71111
</Reference>
112+
<Reference Include="Microsoft.VisualStudio.TextManager.Interop, Version=7.1.40304.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
113+
<HintPath>..\..\packages\Microsoft.VisualStudio.TextManager.Interop.7.10.6070\lib\Microsoft.VisualStudio.TextManager.Interop.dll</HintPath>
114+
<Private>True</Private>
115+
</Reference>
116+
<Reference Include="Microsoft.VisualStudio.TextManager.Interop.8.0, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
117+
<HintPath>..\..\packages\Microsoft.VisualStudio.TextManager.Interop.8.0.8.0.50727\lib\Microsoft.VisualStudio.TextManager.Interop.8.0.dll</HintPath>
118+
<Private>True</Private>
119+
</Reference>
120+
<Reference Include="Microsoft.VisualStudio.Threading, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
121+
<HintPath>..\..\packages\Microsoft.VisualStudio.Threading.14.1.111\lib\net45\Microsoft.VisualStudio.Threading.dll</HintPath>
122+
<Private>True</Private>
123+
</Reference>
124+
<Reference Include="Microsoft.VisualStudio.Utilities, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
125+
<HintPath>..\..\packages\Microsoft.VisualStudio.Utilities.14.3.25407\lib\net45\Microsoft.VisualStudio.Utilities.dll</HintPath>
126+
<Private>True</Private>
127+
</Reference>
128+
<Reference Include="Microsoft.VisualStudio.Validation, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
129+
<HintPath>..\..\packages\Microsoft.VisualStudio.Validation.14.1.111\lib\net45\Microsoft.VisualStudio.Validation.dll</HintPath>
130+
<Private>True</Private>
131+
</Reference>
72132
<Reference Include="PresentationCore" />
73133
<Reference Include="System" />
74134
<Reference Include="System.ComponentModel.Composition" />
@@ -115,12 +175,14 @@
115175
<Compile Include="Models\PullRequestTextBufferInfo.cs" />
116176
<Compile Include="Services\IModelService.cs" />
117177
<Compile Include="Services\IGistPublishService.cs" />
178+
<Compile Include="Services\IPullRequestEditorService.cs" />
118179
<Compile Include="Services\IPullRequestSession.cs" />
119180
<Compile Include="Services\IPullRequestService.cs" />
120181
<Compile Include="Services\IPullRequestSessionManager.cs" />
121182
<Compile Include="Services\IShowDialogService.cs" />
122183
<Compile Include="Services\LocalRepositoriesExtensions.cs" />
123184
<Compile Include="Services\ModelServiceExtensions.cs" />
185+
<Compile Include="Services\PullRequestEditorService.cs" />
124186
<Compile Include="ViewModels\Dialog\IDialogContentViewModel.cs" />
125187
<Compile Include="ViewModels\Dialog\IGitHubDialogWindowViewModel.cs" />
126188
<Compile Include="ViewModels\Dialog\IGistCreationViewModel.cs" />

src/GitHub.Exports/Services/INavigationService.cs renamed to src/GitHub.Exports.Reactive/Services/IPullRequestEditorService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace GitHub.Services
44
{
5-
public interface INavigationService
5+
public interface IPullRequestEditorService
66
{
77
/// <summary>
88
/// Find the active text view.

src/GitHub.App/Services/NavigationService.cs renamed to src/GitHub.Exports.Reactive/Services/PullRequestEditorService.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@
88

99
namespace GitHub.Services
1010
{
11-
[Export(typeof(INavigationService))]
12-
public class NavigationService : INavigationService
11+
[Export(typeof(IPullRequestEditorService))]
12+
public class PullRequestEditorService : IPullRequestEditorService
1313
{
1414
readonly IGitHubServiceProvider serviceProvider;
1515

1616
// If the target line doesn't have a unique match, search this number of lines above looking for a match.
1717
public const int MatchLinesAboveTarget = 4;
1818

1919
[ImportingConstructor]
20-
public NavigationService(IGitHubServiceProvider serviceProvider)
20+
public PullRequestEditorService(IGitHubServiceProvider serviceProvider)
2121
{
2222
this.serviceProvider = serviceProvider;
2323
}

src/GitHub.Exports.Reactive/packages.config

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,24 @@
33
<package id="LibGit2Sharp" version="0.23.1" targetFramework="net461" />
44
<package id="LibGit2Sharp.NativeBinaries" version="1.0.164" targetFramework="net461" />
55
<package id="Microsoft.VisualStudio.CoreUtility" version="14.3.25407" targetFramework="net461" />
6+
<package id="Microsoft.VisualStudio.Imaging" version="14.3.25407" targetFramework="net461" />
7+
<package id="Microsoft.VisualStudio.OLE.Interop" version="7.10.6070" targetFramework="net461" />
8+
<package id="Microsoft.VisualStudio.Shell.14.0" version="14.3.25407" targetFramework="net461" />
9+
<package id="Microsoft.VisualStudio.Shell.Immutable.10.0" version="10.0.30319" targetFramework="net461" />
10+
<package id="Microsoft.VisualStudio.Shell.Immutable.11.0" version="11.0.50727" targetFramework="net461" />
11+
<package id="Microsoft.VisualStudio.Shell.Immutable.12.0" version="12.0.21003" targetFramework="net461" />
12+
<package id="Microsoft.VisualStudio.Shell.Immutable.14.0" version="14.3.25407" targetFramework="net461" />
13+
<package id="Microsoft.VisualStudio.Shell.Interop" version="7.10.6071" targetFramework="net461" />
14+
<package id="Microsoft.VisualStudio.Shell.Interop.8.0" version="8.0.50727" targetFramework="net461" />
15+
<package id="Microsoft.VisualStudio.Shell.Interop.9.0" version="9.0.30729" targetFramework="net461" />
616
<package id="Microsoft.VisualStudio.Text.Data" version="14.3.25407" targetFramework="net461" />
717
<package id="Microsoft.VisualStudio.Text.Logic" version="14.3.25407" targetFramework="net461" />
818
<package id="Microsoft.VisualStudio.Text.UI" version="14.3.25407" targetFramework="net461" />
19+
<package id="Microsoft.VisualStudio.TextManager.Interop" version="7.10.6070" targetFramework="net461" />
20+
<package id="Microsoft.VisualStudio.TextManager.Interop.8.0" version="8.0.50727" targetFramework="net461" />
21+
<package id="Microsoft.VisualStudio.Threading" version="14.1.111" targetFramework="net461" />
22+
<package id="Microsoft.VisualStudio.Utilities" version="14.3.25407" targetFramework="net461" />
23+
<package id="Microsoft.VisualStudio.Validation" version="14.1.111" targetFramework="net461" />
924
<package id="Rx-Core" version="2.2.5-custom" targetFramework="net45" />
1025
<package id="Rx-Interfaces" version="2.2.5-custom" targetFramework="net45" />
1126
<package id="Rx-Linq" version="2.2.5-custom" targetFramework="net45" />

src/GitHub.Exports/GitHub.Exports.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,6 @@
158158
<Compile Include="Services\IEnterpriseCapabilitiesService.cs" />
159159
<Compile Include="Services\IGlobalConnection.cs" />
160160
<Compile Include="Services\ILocalRepositories.cs" />
161-
<Compile Include="Services\INavigationService.cs" />
162161
<Compile Include="Services\ITeamExplorerContext.cs" />
163162
<Compile Include="Services\IVisualStudioBrowser.cs" />
164163
<Compile Include="Models\UsageData.cs" />

src/GitHub.VisualStudio/Views/GitHubPane/PullRequestDetailView.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public PullRequestDetailView()
7070
IUsageTracker UsageTracker { get; set; }
7171

7272
[Import]
73-
INavigationService NavigationService { get; set; }
73+
IPullRequestEditorService NavigationService { get; set; }
7474

7575
[Import]
7676
IVsEditorAdaptersFactoryService EditorAdaptersFactoryService { get; set; }

test/UnitTests/GitHub.App/Services/NavigationServiceTests.cs renamed to test/UnitTests/GitHub.Exports.Reactive/Services/PullRequestEditorServiceTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
using NUnit.Framework;
44
using NSubstitute;
55

6-
public class NavigationServiceTests
6+
public class PullRequestEditorServiceTests
77
{
88
public class TheFindNearestMatchingLineMethod
99
{
@@ -45,9 +45,9 @@ public void FindNearestMatchingLine(IList<string> fromLines, IList<string> toLin
4545
}
4646
}
4747

48-
static NavigationService CreateNavigationService()
48+
static PullRequestEditorService CreateNavigationService()
4949
{
5050
var sp = Substitute.For<IGitHubServiceProvider>();
51-
return new NavigationService(sp);
51+
return new PullRequestEditorService(sp);
5252
}
5353
}

test/UnitTests/UnitTests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@
234234
<Compile Include="GitHub.App\Models\RepositoryModelTests.cs" />
235235
<Compile Include="GitHub.App\Services\AvatarProviderTests.cs" />
236236
<Compile Include="GitHub.App\Services\GitClientTests.cs" />
237-
<Compile Include="GitHub.App\Services\NavigationServiceTests.cs" />
237+
<Compile Include="GitHub.Exports.Reactive\Services\PullRequestEditorServiceTests.cs" />
238238
<Compile Include="GitHub.App\Services\OAuthCallbackListenerTests.cs" />
239239
<Compile Include="GitHub.App\Services\PullRequestServiceTests.cs" />
240240
<Compile Include="GitHub.App\Services\RepositoryCloneServiceTests.cs" />

0 commit comments

Comments
 (0)