Upgrade Rothko and fix breaking changes

Sorry!
This commit is contained in:
Haacked 2015-03-11 15:05:15 -07:00
Родитель e99c17fd7d
Коммит 57b9589d1a
26 изменённых файлов: 76 добавлений и 42 удалений

2
.gitmodules поставляемый
Просмотреть файл

@ -1,6 +1,6 @@
[submodule "submodules/rothko"] [submodule "submodules/rothko"]
path = submodules/rothko path = submodules/rothko
url = https://github.com/shana/Rothko.git url = https://github.com/haacked/Rothko.git
[submodule "submodules/reactiveui"] [submodule "submodules/reactiveui"]
path = submodules/reactiveui path = submodules/reactiveui
url = https://github.com/shana/ReactiveUI url = https://github.com/shana/ReactiveUI

Просмотреть файл

@ -43,7 +43,7 @@ namespace DesignTimeStyleHelper
SComponentModel sc; SComponentModel sc;
[Import] [Import]
public IBrowser Browser; public IVisualStudioBrowser Browser;
[Import] [Import]
public ExportFactoryProvider ExportFactoryProvider; public ExportFactoryProvider ExportFactoryProvider;

Просмотреть файл

@ -6,4 +6,5 @@
<package id="Rx-Linq" version="2.2.5" targetFramework="net45" /> <package id="Rx-Linq" version="2.2.5" targetFramework="net45" />
<package id="Rx-Main" version="2.2.5" targetFramework="net45" /> <package id="Rx-Main" version="2.2.5" targetFramework="net45" />
<package id="Rx-PlatformServices" version="2.2.5" targetFramework="net45" /> <package id="Rx-PlatformServices" version="2.2.5" targetFramework="net45" />
<package id="Rx-XAML" version="2.2.5" targetFramework="net45" />
</packages> </packages>

Просмотреть файл

@ -13,10 +13,10 @@ namespace GitHub.Factories
public class HostCacheFactory : IHostCacheFactory public class HostCacheFactory : IHostCacheFactory
{ {
readonly Lazy<IBlobCacheFactory> blobCacheFactory; readonly Lazy<IBlobCacheFactory> blobCacheFactory;
readonly Lazy<IOperatingSystemFacade> operatingSystem; readonly Lazy<IOperatingSystem> operatingSystem;
[ImportingConstructor] [ImportingConstructor]
public HostCacheFactory(Lazy<IBlobCacheFactory> blobCacheFactory, Lazy<IOperatingSystemFacade> operatingSystem) public HostCacheFactory(Lazy<IBlobCacheFactory> blobCacheFactory, Lazy<IOperatingSystem> operatingSystem)
{ {
this.blobCacheFactory = blobCacheFactory; this.blobCacheFactory = blobCacheFactory;
this.operatingSystem = operatingSystem; this.operatingSystem = operatingSystem;
@ -43,7 +43,7 @@ namespace GitHub.Factories
return new HostCache(localMachineCache, userAccountCache); return new HostCache(localMachineCache, userAccountCache);
} }
IOperatingSystemFacade OperatingSystem { get { return operatingSystem.Value; } } IOperatingSystem OperatingSystem { get { return operatingSystem.Value; } }
IBlobCacheFactory BlobCacheFactory { get { return blobCacheFactory.Value; } } IBlobCacheFactory BlobCacheFactory { get { return blobCacheFactory.Value; } }
} }
} }

Просмотреть файл

@ -63,6 +63,14 @@
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\NullGuard.Fody.1.4.1\Lib\portable-net4+sl4+wp7+win8+MonoAndroid16+MonoTouch40\NullGuard.dll</HintPath> <HintPath>..\..\packages\NullGuard.Fody.1.4.1\Lib\portable-net4+sl4+wp7+win8+MonoAndroid16+MonoTouch40\NullGuard.dll</HintPath>
</Reference> </Reference>
<Reference Include="Octokit, Version=0.6.2.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Octokit.0.6.2\lib\net45\Octokit.dll</HintPath>
</Reference>
<Reference Include="Octokit.Reactive, Version=0.6.2.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Octokit.Reactive.0.6.2\lib\net45\Octokit.Reactive.dll</HintPath>
</Reference>
<Reference Include="PresentationCore" /> <Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" /> <Reference Include="PresentationFramework" />
<Reference Include="SQLitePCL.raw, Version=0.7.2.0, Culture=neutral, PublicKeyToken=d89a3d1cc066b805, processorArchitecture=MSIL"> <Reference Include="SQLitePCL.raw, Version=0.7.2.0, Culture=neutral, PublicKeyToken=d89a3d1cc066b805, processorArchitecture=MSIL">

Просмотреть файл

@ -2,13 +2,13 @@
using System.ComponentModel.Composition; using System.ComponentModel.Composition;
using System.IO; using System.IO;
using GitHub.Services; using GitHub.Services;
using NLog;
using Rothko; using Rothko;
using NLog;
namespace GitHub namespace GitHub
{ {
[Export(typeof(IBrowser))] [Export(typeof(IVisualStudioBrowser))]
public class Browser : IBrowser public class Browser : IVisualStudioBrowser
{ {
static readonly Logger log = LogManager.GetCurrentClassLogger(); static readonly Logger log = LogManager.GetCurrentClassLogger();

Просмотреть файл

@ -21,9 +21,8 @@ namespace GitHub.ViewModels
{ {
static readonly Logger log = LogManager.GetCurrentClassLogger(); static readonly Logger log = LogManager.GetCurrentClassLogger();
// TODO: Lets fix it so we don't have to suppress this.
[SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] [SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
protected LoginTabViewModel(IRepositoryHosts repositoryHosts, IBrowser browser) protected LoginTabViewModel(IRepositoryHosts repositoryHosts, IVisualStudioBrowser browser)
{ {
RepositoryHosts = repositoryHosts; RepositoryHosts = repositoryHosts;

Просмотреть файл

@ -18,7 +18,7 @@ namespace GitHub.ViewModels
public class LoginToGitHubForEnterpriseViewModel : LoginTabViewModel, ILoginToGitHubForEnterpriseViewModel public class LoginToGitHubForEnterpriseViewModel : LoginTabViewModel, ILoginToGitHubForEnterpriseViewModel
{ {
[ImportingConstructor] [ImportingConstructor]
public LoginToGitHubForEnterpriseViewModel(IRepositoryHosts hosts, IBrowser browser) : base(hosts, browser) public LoginToGitHubForEnterpriseViewModel(IRepositoryHosts hosts, IVisualStudioBrowser browser) : base(hosts, browser)
{ {
enterpriseUrlValidator = ReactivePropertyValidator.For(this, x => x.EnterpriseUrl) enterpriseUrlValidator = ReactivePropertyValidator.For(this, x => x.EnterpriseUrl)
.IfNullOrEmpty("Please enter an Enterprise URL") .IfNullOrEmpty("Please enter an Enterprise URL")

Просмотреть файл

@ -16,7 +16,7 @@ namespace GitHub.ViewModels
readonly Uri baseUri; readonly Uri baseUri;
[ImportingConstructor] [ImportingConstructor]
public LoginToGitHubViewModel(IRepositoryHosts repositoryHosts, IBrowser browser) public LoginToGitHubViewModel(IRepositoryHosts repositoryHosts, IVisualStudioBrowser browser)
: base(repositoryHosts, browser) : base(repositoryHosts, browser)
{ {
baseUri = repositoryHosts.GitHubHost.Address.WebUri; baseUri = repositoryHosts.GitHubHost.Address.WebUri;

Просмотреть файл

@ -23,7 +23,7 @@ namespace GitHub.ViewModels
readonly ObservableAsPropertyHelper<bool> isSms; readonly ObservableAsPropertyHelper<bool> isSms;
[ImportingConstructor] [ImportingConstructor]
public TwoFactorDialogViewModel(IBrowser browser) public TwoFactorDialogViewModel(IVisualStudioBrowser browser)
{ {
OkCommand = ReactiveCommand.Create(this.WhenAny( OkCommand = ReactiveCommand.Create(this.WhenAny(
x => x.AuthenticationCodeValidator.ValidationResult.IsValid, x => x.AuthenticationCodeValidator.ValidationResult.IsValid,

Просмотреть файл

@ -84,7 +84,7 @@
<Compile Include="Primitives\UriString.cs" /> <Compile Include="Primitives\UriString.cs" />
<Compile Include="Services\EnterpriseProbeTask.cs" /> <Compile Include="Services\EnterpriseProbeTask.cs" />
<Compile Include="Services\ExportFactoryProvider.cs" /> <Compile Include="Services\ExportFactoryProvider.cs" />
<Compile Include="Services\IBrowser.cs" /> <Compile Include="Services\IVisualStudioBrowser.cs" />
<Compile Include="Services\IEnterpriseProbeTask.cs" /> <Compile Include="Services\IEnterpriseProbeTask.cs" />
<Compile Include="Services\IUIProvider.cs" /> <Compile Include="Services\IUIProvider.cs" />
<Compile Include="Services\IWikiProbe.cs" /> <Compile Include="Services\IWikiProbe.cs" />

Просмотреть файл

@ -1,9 +0,0 @@
using System;
namespace GitHub.Services
{
public interface IBrowser
{
void OpenUrl(Uri url);
}
}

Просмотреть файл

@ -0,0 +1,19 @@
using System;
namespace GitHub.Services
{
/// <summary>
/// A service used to navigate to URLs such as GitHub issues, pull requests, etc.
/// </summary>
/// <remarks>
/// This interface is (and needs to be) safe to use within TeamExplorer. It should not pull in other dependencies.
/// </remarks>
public interface IVisualStudioBrowser
{
/// <summary>
/// Opens the user's default browser to the specified URL.
/// </summary>
/// <param name="url">The absolute URI to open</param>
void OpenUrl(Uri url);
}
}

Просмотреть файл

@ -11,7 +11,6 @@
<AssemblyName>GitHub.Extensions.Reactive</AssemblyName> <AssemblyName>GitHub.Extensions.Reactive</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion> <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<NuGetPackageImportStamp>9b778d60</NuGetPackageImportStamp>
<NuGetPackageImportStamp>83c06b42</NuGetPackageImportStamp> <NuGetPackageImportStamp>83c06b42</NuGetPackageImportStamp>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<RunCodeAnalysis>true</RunCodeAnalysis> <RunCodeAnalysis>true</RunCodeAnalysis>
@ -51,6 +50,7 @@
<ItemGroup> <ItemGroup>
<Reference Include="NullGuard, Version=1.4.1.0, Culture=neutral, PublicKeyToken=1958ac8092168428, processorArchitecture=MSIL"> <Reference Include="NullGuard, Version=1.4.1.0, Culture=neutral, PublicKeyToken=1958ac8092168428, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<Private>True</Private>
<HintPath>..\..\packages\NullGuard.Fody.1.4.1\Lib\portable-net4+sl4+wp7+win8+MonoAndroid16+MonoTouch40\NullGuard.dll</HintPath> <HintPath>..\..\packages\NullGuard.Fody.1.4.1\Lib\portable-net4+sl4+wp7+win8+MonoAndroid16+MonoTouch40\NullGuard.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
@ -109,6 +109,7 @@
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\..\packages\Fody.1.28.0\build\Fody.targets" Condition="Exists('..\..\packages\Fody.1.28.0\build\Fody.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup> <PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>

Просмотреть файл

@ -96,6 +96,7 @@
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\..\packages\Fody.1.28.0\build\Fody.targets" Condition="Exists('..\..\packages\Fody.1.28.0\build\Fody.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup> <PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>

Просмотреть файл

@ -12,7 +12,11 @@
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion> <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<NuGetPackageImportStamp>86007da4</NuGetPackageImportStamp> <NuGetPackageImportStamp>0264ca35</NuGetPackageImportStamp>
<WarningLevel>4</WarningLevel>
<RunCodeAnalysis>true</RunCodeAnalysis>
<CodeAnalysisRuleSet>..\..\script\GitHubVS.ruleset</CodeAnalysisRuleSet>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
@ -47,6 +51,7 @@
<ItemGroup> <ItemGroup>
<Reference Include="NullGuard, Version=1.4.1.0, Culture=neutral, PublicKeyToken=1958ac8092168428, processorArchitecture=MSIL"> <Reference Include="NullGuard, Version=1.4.1.0, Culture=neutral, PublicKeyToken=1958ac8092168428, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<Private>True</Private>
<HintPath>..\..\packages\NullGuard.Fody.1.4.1\Lib\portable-net4+sl4+wp7+win8+MonoAndroid16+MonoTouch40\NullGuard.dll</HintPath> <HintPath>..\..\packages\NullGuard.Fody.1.4.1\Lib\portable-net4+sl4+wp7+win8+MonoAndroid16+MonoTouch40\NullGuard.dll</HintPath>
</Reference> </Reference>
<Reference Include="PresentationCore" /> <Reference Include="PresentationCore" />

Просмотреть файл

@ -76,7 +76,7 @@ namespace GitHub.VisualStudio.Base
return visible; return visible;
} }
protected async void OpenInBrowser(Lazy<IBrowser> browser, string endpoint) protected async void OpenInBrowser(Lazy<IVisualStudioBrowser> browser, string endpoint)
{ {
var b = browser.Value; var b = browser.Value;
Debug.Assert(b != null, "Could not create a browser helper instance."); Debug.Assert(b != null, "Could not create a browser helper instance.");

Просмотреть файл

@ -4,7 +4,7 @@
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion> <MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">12.0</VisualStudioVersion> <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">12.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath> <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
<NuGetPackageImportStamp>1fcdc7f2</NuGetPackageImportStamp> <NuGetPackageImportStamp>8fda56e5</NuGetPackageImportStamp>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
@ -102,6 +102,14 @@
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\NullGuard.Fody.1.4.1\Lib\portable-net4+sl4+wp7+win8+MonoAndroid16+MonoTouch40\NullGuard.dll</HintPath> <HintPath>..\..\packages\NullGuard.Fody.1.4.1\Lib\portable-net4+sl4+wp7+win8+MonoAndroid16+MonoTouch40\NullGuard.dll</HintPath>
</Reference> </Reference>
<Reference Include="Octokit, Version=0.6.2.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Octokit.0.6.2\lib\net45\Octokit.dll</HintPath>
</Reference>
<Reference Include="Splat, Version=1.6.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Splat.1.6.0\lib\Net45\Splat.dll</HintPath>
</Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.ComponentModel.Composition" /> <Reference Include="System.ComponentModel.Composition" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
@ -359,6 +367,7 @@
</PropertyGroup> </PropertyGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="$(VSToolsPath)\VSSDK\Microsoft.VsSDK.targets" Condition="'$(VSToolsPath)' != ''" /> <Import Project="$(VSToolsPath)\VSSDK\Microsoft.VsSDK.targets" Condition="'$(VSToolsPath)' != ''" />
<Import Project="..\..\packages\Fody.1.28.0\build\Fody.targets" Condition="Exists('..\..\packages\Fody.1.28.0\build\Fody.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup> <PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>

Просмотреть файл

@ -10,8 +10,8 @@ using Rothko;
namespace GitHub.VisualStudio.Helpers namespace GitHub.VisualStudio.Helpers
{ {
[Export(typeof(IBrowser))] [Export(typeof(IVisualStudioBrowser))]
public class Browser : IBrowser public class Browser : IVisualStudioBrowser
{ {
readonly IServiceProvider serviceProvider; readonly IServiceProvider serviceProvider;
readonly IProcessStarter processManager; readonly IProcessStarter processManager;

Просмотреть файл

@ -17,11 +17,11 @@ namespace GitHub.VisualStudio.TeamExplorerHome
{ {
public const string GraphsNavigationItemId = "5245767A-B657-4F8E-BFEE-F04159F1DDA5"; public const string GraphsNavigationItemId = "5245767A-B657-4F8E-BFEE-F04159F1DDA5";
readonly Lazy<IBrowser> browser; readonly Lazy<IVisualStudioBrowser> browser;
[ImportingConstructor] [ImportingConstructor]
public GraphsNavigationItem([Import(typeof(SVsServiceProvider))] IServiceProvider serviceProvider, public GraphsNavigationItem([Import(typeof(SVsServiceProvider))] IServiceProvider serviceProvider,
ISimpleApiClientFactory apiFactory, Lazy<IBrowser> browser) ISimpleApiClientFactory apiFactory, Lazy<IVisualStudioBrowser> browser)
: base(serviceProvider, apiFactory) : base(serviceProvider, apiFactory)
{ {
this.browser = browser; this.browser = browser;

Просмотреть файл

@ -17,11 +17,11 @@ namespace GitHub.VisualStudio.TeamExplorerHome
{ {
public const string IssuesNavigationItemId = "5245767A-B657-4F8E-BFEE-F04159F1DDA4"; public const string IssuesNavigationItemId = "5245767A-B657-4F8E-BFEE-F04159F1DDA4";
readonly Lazy<IBrowser> browser; readonly Lazy<IVisualStudioBrowser> browser;
[ImportingConstructor] [ImportingConstructor]
public IssuesNavigationItem([Import(typeof(SVsServiceProvider))] IServiceProvider serviceProvider, public IssuesNavigationItem([Import(typeof(SVsServiceProvider))] IServiceProvider serviceProvider,
ISimpleApiClientFactory apiFactory, Lazy<IBrowser> browser) ISimpleApiClientFactory apiFactory, Lazy<IVisualStudioBrowser> browser)
: base(serviceProvider, apiFactory) : base(serviceProvider, apiFactory)
{ {
this.browser = browser; this.browser = browser;

Просмотреть файл

@ -17,11 +17,11 @@ namespace GitHub.VisualStudio.TeamExplorerHome
{ {
public const string PullRequestsNavigationItemId = "5245767A-B657-4F8E-BFEE-F04159F1DDA3"; public const string PullRequestsNavigationItemId = "5245767A-B657-4F8E-BFEE-F04159F1DDA3";
readonly Lazy<IBrowser> browser; readonly Lazy<IVisualStudioBrowser> browser;
[ImportingConstructor] [ImportingConstructor]
public PullRequestsNavigationItem([Import(typeof(SVsServiceProvider))] IServiceProvider serviceProvider, public PullRequestsNavigationItem([Import(typeof(SVsServiceProvider))] IServiceProvider serviceProvider,
ISimpleApiClientFactory apiFactory, Lazy<IBrowser> browser) ISimpleApiClientFactory apiFactory, Lazy<IVisualStudioBrowser> browser)
: base(serviceProvider, apiFactory) : base(serviceProvider, apiFactory)
{ {
this.browser = browser; this.browser = browser;

Просмотреть файл

@ -17,11 +17,11 @@ namespace GitHub.VisualStudio.TeamExplorerHome
{ {
public const string PulseNavigationItemId = "5245767A-B657-4F8E-BFEE-F04159F1DDA2"; public const string PulseNavigationItemId = "5245767A-B657-4F8E-BFEE-F04159F1DDA2";
readonly Lazy<IBrowser> browser; readonly Lazy<IVisualStudioBrowser> browser;
[ImportingConstructor] [ImportingConstructor]
public PulseNavigationItem([Import(typeof(SVsServiceProvider))] IServiceProvider serviceProvider, public PulseNavigationItem([Import(typeof(SVsServiceProvider))] IServiceProvider serviceProvider,
ISimpleApiClientFactory apiFactory, Lazy<IBrowser> browser) ISimpleApiClientFactory apiFactory, Lazy<IVisualStudioBrowser> browser)
: base(serviceProvider, apiFactory) : base(serviceProvider, apiFactory)
{ {
this.browser = browser; this.browser = browser;

Просмотреть файл

@ -17,11 +17,11 @@ namespace GitHub.VisualStudio.TeamExplorerHome
{ {
public const string WikiNavigationItemId = "5245767A-B657-4F8E-BFEE-F04159F1DDA1"; public const string WikiNavigationItemId = "5245767A-B657-4F8E-BFEE-F04159F1DDA1";
readonly Lazy<IBrowser> browser; readonly Lazy<IVisualStudioBrowser> browser;
[ImportingConstructor] [ImportingConstructor]
public WikiNavigationItem([Import(typeof(SVsServiceProvider))] IServiceProvider serviceProvider, public WikiNavigationItem([Import(typeof(SVsServiceProvider))] IServiceProvider serviceProvider,
ISimpleApiClientFactory apiFactory, Lazy<IBrowser> browser) ISimpleApiClientFactory apiFactory, Lazy<IVisualStudioBrowser> browser)
: base(serviceProvider, apiFactory) : base(serviceProvider, apiFactory)
{ {
this.browser = browser; this.browser = browser;

Просмотреть файл

@ -18,7 +18,7 @@ public class LoginToGitHubViewModelTests
var gitHubHost = Substitute.For<IRepositoryHost>(); var gitHubHost = Substitute.For<IRepositoryHost>();
gitHubHost.Address.Returns(HostAddress.GitHubDotComHostAddress); gitHubHost.Address.Returns(HostAddress.GitHubDotComHostAddress);
repositoryHosts.GitHubHost.Returns(gitHubHost); repositoryHosts.GitHubHost.Returns(gitHubHost);
var browser = Substitute.For<IBrowser>(); var browser = Substitute.For<IVisualStudioBrowser>();
var loginViewModel = new LoginToGitHubViewModel(repositoryHosts, browser); var loginViewModel = new LoginToGitHubViewModel(repositoryHosts, browser);
loginViewModel.SignUp.Execute(null); loginViewModel.SignUp.Execute(null);
@ -36,7 +36,7 @@ public class LoginToGitHubViewModelTests
var gitHubHost = Substitute.For<IRepositoryHost>(); var gitHubHost = Substitute.For<IRepositoryHost>();
gitHubHost.Address.Returns(HostAddress.GitHubDotComHostAddress); gitHubHost.Address.Returns(HostAddress.GitHubDotComHostAddress);
repositoryHosts.GitHubHost.Returns(gitHubHost); repositoryHosts.GitHubHost.Returns(gitHubHost);
var browser = Substitute.For<IBrowser>(); var browser = Substitute.For<IVisualStudioBrowser>();
var loginViewModel = new LoginToGitHubViewModel(repositoryHosts, browser); var loginViewModel = new LoginToGitHubViewModel(repositoryHosts, browser);
loginViewModel.ForgotPassword.Execute(null); loginViewModel.ForgotPassword.Execute(null);

@ -1 +1 @@
Subproject commit 3017843941b12b73154bdbbb3374503db96fdec8 Subproject commit 9a056be65686807674e8087e2ec2e6602e82e808