As suggested in #1352.

Fixes #1352.
This commit is contained in:
Steven Kirk 2017-11-28 18:37:19 +01:00
Родитель e13678c2ea
Коммит c747b455a7
18 изменённых файлов: 0 добавлений и 871 удалений

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

@ -58,8 +58,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GitHub.Api", "src\GitHub.Ap
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GitHub.Exports.Reactive", "src\GitHub.Exports.Reactive\GitHub.Exports.Reactive.csproj", "{E4ED0537-D1D9-44B6-9212-3096D7C3F7A1}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DesignTimeStyleHelper", "src\DesignTimeStyleHelper\DesignTimeStyleHelper.csproj", "{B1F5C227-456F-437D-BD5F-4C11B7A8D1A0}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Octokit", "Octokit", "{1E7F7253-A6AF-43C4-A955-37BEDDA01AC0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Octokit", "submodules\octokit.net\Octokit\Octokit.csproj", "{08DD4305-7787-4823-A53F-4D0F725A07F3}"
@ -215,16 +213,6 @@ Global
{E4ED0537-D1D9-44B6-9212-3096D7C3F7A1}.Release|Any CPU.Build.0 = Release|Any CPU
{E4ED0537-D1D9-44B6-9212-3096D7C3F7A1}.ReleaseWithoutVsix|Any CPU.ActiveCfg = Release|Any CPU
{E4ED0537-D1D9-44B6-9212-3096D7C3F7A1}.ReleaseWithoutVsix|Any CPU.Build.0 = Release|Any CPU
{B1F5C227-456F-437D-BD5F-4C11B7A8D1A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B1F5C227-456F-437D-BD5F-4C11B7A8D1A0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B1F5C227-456F-437D-BD5F-4C11B7A8D1A0}.DebugCodeAnalysis|Any CPU.ActiveCfg = Debug|Any CPU
{B1F5C227-456F-437D-BD5F-4C11B7A8D1A0}.DebugCodeAnalysis|Any CPU.Build.0 = Debug|Any CPU
{B1F5C227-456F-437D-BD5F-4C11B7A8D1A0}.DebugWithoutVsix|Any CPU.ActiveCfg = Debug|Any CPU
{B1F5C227-456F-437D-BD5F-4C11B7A8D1A0}.DebugWithoutVsix|Any CPU.Build.0 = Debug|Any CPU
{B1F5C227-456F-437D-BD5F-4C11B7A8D1A0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B1F5C227-456F-437D-BD5F-4C11B7A8D1A0}.Release|Any CPU.Build.0 = Release|Any CPU
{B1F5C227-456F-437D-BD5F-4C11B7A8D1A0}.ReleaseWithoutVsix|Any CPU.ActiveCfg = Release|Any CPU
{B1F5C227-456F-437D-BD5F-4C11B7A8D1A0}.ReleaseWithoutVsix|Any CPU.Build.0 = Release|Any CPU
{08DD4305-7787-4823-A53F-4D0F725A07F3}.Debug|Any CPU.ActiveCfg = Release|Any CPU
{08DD4305-7787-4823-A53F-4D0F725A07F3}.Debug|Any CPU.Build.0 = Release|Any CPU
{08DD4305-7787-4823-A53F-4D0F725A07F3}.DebugCodeAnalysis|Any CPU.ActiveCfg = Release|Any CPU

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

@ -1,58 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Microsoft.TeamFoundation.Git.Controls" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-15.0.0.0" newVersion="15.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.VisualStudio.Imaging" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-14.0.0.0" newVersion="14.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.TeamFoundation.Controls" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-14.0.0.0" newVersion="14.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.VisualStudio.Utilities" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-14.0.0.0" newVersion="14.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.VisualStudio.Threading" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-14.0.0.0" newVersion="14.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.VisualStudio.Text.Data" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-14.0.0.0" newVersion="14.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.VisualStudio.CoreUtility" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-14.0.0.0" newVersion="14.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Xml.ReaderWriter" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Net.Http" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.1.0" newVersion="4.1.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Diagnostics.DiagnosticSource" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.VisualStudio.ComponentModelHost" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-14.0.0.0" newVersion="14.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.VisualStudio.Validation" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-14.0.0.0" newVersion="14.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

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

@ -1,15 +0,0 @@
<Application x:Class="DesignTimeStyleHelper.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:DesignTimeStyleHelper"
StartupUri="MainWindow.xaml">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/GitHub.UI;component/SharedDictionary.xaml" />
<ResourceDictionary Source="/GitHub.UI.Reactive;component/SharedDictionary.xaml" />
<ResourceDictionary Source="/GitHub.VisualStudio;component/SharedDictionary.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
</Application>

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

@ -1,140 +0,0 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.ComponentModel.Composition.Hosting;
using System.ComponentModel.Composition.Primitives;
using System.Globalization;
using System.Linq;
using System.Windows;
using GitHub.Services;
using GitHub.VisualStudio;
using Microsoft.VisualStudio.ComponentModelHost;
using Microsoft.VisualStudio.Shell;
using Moq;
using GitHub.Models;
namespace DesignTimeStyleHelper
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
public static Holder ExportHolder { get; set; }
public static CustomServiceProvider ServiceProvider { get { return (CustomServiceProvider) ExportHolder.ServiceProvider; } }
public App()
{
var s = new CustomServiceProvider();
ExportHolder = new Holder(s.DefaultCompositionService);
}
}
public class Holder
{
[Import]
public SVsServiceProvider ServiceProvider;
[Import]
public SComponentModel sc;
[Import]
public IVisualStudioBrowser Browser;
[Import]
public IExportFactoryProvider ExportFactoryProvider;
[Import]
public IGitHubServiceProvider GitHubServiceProvider;
public Holder(ICompositionService cc)
{
cc.SatisfyImportsOnce(this);
}
}
[Export(typeof(SVsServiceProvider))]
[Export(typeof(SComponentModel))]
[PartCreationPolicy(CreationPolicy.Shared)]
public class CustomServiceProvider : SVsServiceProvider, IServiceProvider,
SComponentModel, IComponentModel
{
readonly CompositionContainer container;
public CompositionContainer Container { get { return container; } }
AggregateCatalog catalog;
public CustomServiceProvider()
{
catalog = new AggregateCatalog(
new AssemblyCatalog(typeof(CustomServiceProvider).Assembly),
new AssemblyCatalog(typeof(Program).Assembly), // GitHub.VisualStudio
new AssemblyCatalog(typeof(GitHub.Api.ApiClient).Assembly), // GitHub.App
new AssemblyCatalog(typeof(GitHub.Api.SimpleApiClient).Assembly), // GitHub.Api
new AssemblyCatalog(typeof(Rothko.Environment).Assembly), // Rothko
new AssemblyCatalog(typeof(EnterpriseProbeTask).Assembly) // GitHub.Exports
);
container = new CompositionContainer(catalog, CompositionOptions.IsThreadSafe | CompositionOptions.DisableSilentRejection);
DefaultCatalog = catalog;
DefaultExportProvider = container;
DefaultCompositionService = DefaultCatalog.CreateCompositionService();
var batch = new CompositionBatch();
batch.AddExportedValue<SVsServiceProvider>(this);
batch.AddExportedValue<SComponentModel>(this);
batch.AddExportedValue<ICompositionService>(DefaultCompositionService);
container.Compose(batch);
}
public object GetService(Type serviceType)
{
string contract = AttributedModelServices.GetContractName(serviceType);
var instance = container.GetExportedValues<object>(contract).FirstOrDefault();
if (instance != null)
return instance;
instance = Create(serviceType);
if (instance != null)
return instance;
throw new InvalidOperationException(string.Format(CultureInfo.InvariantCulture,
"Could not locate any instances of contract {0}.", contract));
}
T Create<T>() where T : class
{
return new Mock<T>().Object;
}
static object Create(Type t)
{
var moq = typeof(Mock<>).MakeGenericType(t);
var ctor = moq.GetConstructor(new Type[] { });
var m = ctor?.Invoke(new object[] { }) as Mock;
return m?.Object;
}
public ExportProvider DefaultExportProvider { get; set; }
public ComposablePartCatalog DefaultCatalog { get; set; }
public ICompositionService DefaultCompositionService { get; set; }
public ComposablePartCatalog GetCatalog(string catalogName)
{
throw new NotImplementedException();
}
public IEnumerable<T> GetExtensions<T>() where T : class
{
throw new NotImplementedException();
}
public T GetService<T>() where T : class
{
throw new NotImplementedException();
}
}
}

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

@ -1,213 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{B1F5C227-456F-437D-BD5F-4C11B7A8D1A0}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>DesignTimeStyleHelper</RootNamespace>
<AssemblyName>DesignTimeStyleHelper</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<OutputPath>bin\Debug\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<OutputPath>bin\Release\</OutputPath>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.VisualStudio.ComponentModelHost, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.VisualStudio.ComponentModelHost.14.0.25424\lib\net45\Microsoft.VisualStudio.ComponentModelHost.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.VisualStudio.Shell.Immutable.10.0, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.VisualStudio.Shell.Immutable.10.0.10.0.30319\lib\net40\Microsoft.VisualStudio.Shell.Immutable.10.0.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Moq">
<HintPath>..\..\packages\Moq.4.2.1312.1319\lib\net40\Moq.dll</HintPath>
</Reference>
<Reference Include="rothko, Version=0.0.2.0, Culture=neutral, PublicKeyToken=9f664c41f503810a, processorArchitecture=MSIL">
<HintPath>..\..\packages\Rothko.0.0.2-ghfvs\lib\net45\rothko.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.Composition" />
<Reference Include="System.Data" />
<Reference Include="System.Reactive.Core, Version=2.2.5.0, Culture=neutral, PublicKeyToken=62aa029873c516b4, processorArchitecture=MSIL">
<HintPath>..\..\packages\Rx-Core.2.2.5-custom\lib\net45\System.Reactive.Core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Reactive.Interfaces, Version=2.2.5.0, Culture=neutral, PublicKeyToken=62aa029873c516b4, processorArchitecture=MSIL">
<HintPath>..\..\packages\Rx-Interfaces.2.2.5-custom\lib\net45\System.Reactive.Interfaces.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Reactive.Linq, Version=2.2.5.0, Culture=neutral, PublicKeyToken=62aa029873c516b4, processorArchitecture=MSIL">
<HintPath>..\..\packages\Rx-Linq.2.2.5-custom\lib\net45\System.Reactive.Linq.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Reactive.PlatformServices, Version=2.2.5.0, Culture=neutral, PublicKeyToken=62aa029873c516b4, processorArchitecture=MSIL">
<HintPath>..\..\packages\Rx-PlatformServices.2.2.5-custom\lib\net45\System.Reactive.PlatformServices.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Reactive.Windows.Threading, Version=2.2.5.0, Culture=neutral, PublicKeyToken=62aa029873c516b4, processorArchitecture=MSIL">
<HintPath>..\..\packages\Rx-XAML.2.2.5-custom\lib\net45\System.Reactive.Windows.Threading.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Xaml">
<RequiredTargetFramework>4.0</RequiredTargetFramework>
</Reference>
<Reference Include="WindowsBase" />
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<Reference Include="Microsoft.TeamFoundation.Git.Provider, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\..\lib\14.0\Microsoft.TeamFoundation.Git.Provider.dll</HintPath>
<Private>True</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<ApplicationDefinition Include="App.xaml">
<Generator>MSBuild:Compile</Generator>
</ApplicationDefinition>
<Compile Include="TwoFactorInputTester.xaml.cs">
<DependentUpon>TwoFactorInputTester.xaml</DependentUpon>
</Compile>
<Compile Include="WindowController.xaml.cs">
<DependentUpon>WindowController.xaml</DependentUpon>
</Compile>
<Page Include="MainWindow.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Compile Include="App.xaml.cs">
<DependentUpon>App.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Include="MainWindow.xaml.cs">
<DependentUpon>MainWindow.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Page Include="TwoFactorInputTester.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="WindowController.xaml">
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<ItemGroup>
<Compile Include="..\common\SolutionInfo.cs">
<Link>Properties\SolutionInfo.cs</Link>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<None Include="packages.config">
<SubType>Designer</SubType>
</None>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<AppDesigner Include="Properties\" />
</ItemGroup>
<ItemGroup>
<None Include="App.config">
<SubType>Designer</SubType>
</None>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\GitHub.Api\GitHub.Api.csproj">
<Project>{b389adaf-62cc-486e-85b4-2d8b078df763}</Project>
<Name>GitHub.Api</Name>
</ProjectReference>
<ProjectReference Include="..\GitHub.App\GitHub.App.csproj">
<Project>{1a1da411-8d1f-4578-80a6-04576bea2dc5}</Project>
<Name>GitHub.App</Name>
</ProjectReference>
<ProjectReference Include="..\GitHub.Exports\GitHub.Exports.csproj">
<Project>{9aea02db-02b5-409c-b0ca-115d05331a6b}</Project>
<Name>GitHub.Exports</Name>
</ProjectReference>
<ProjectReference Include="..\GitHub.Exports.Reactive\GitHub.Exports.Reactive.csproj">
<Project>{e4ed0537-d1d9-44b6-9212-3096d7c3f7a1}</Project>
<Name>GitHub.Exports.Reactive</Name>
</ProjectReference>
<ProjectReference Include="..\GitHub.TeamFoundation.14\GitHub.TeamFoundation.14.csproj">
<Project>{161dbf01-1dbf-4b00-8551-c5c00f26720d}</Project>
<Name>GitHub.TeamFoundation.14</Name>
</ProjectReference>
<ProjectReference Include="..\GitHub.UI.Reactive\GitHub.UI.Reactive.csproj">
<Project>{158b05e8-fdbc-4d71-b871-c96e28d5adf5}</Project>
<Name>GitHub.UI.Reactive</Name>
</ProjectReference>
<ProjectReference Include="..\GitHub.UI\GitHub.UI.csproj">
<Project>{346384dd-2445-4a28-af22-b45f3957bd89}</Project>
<Name>GitHub.UI</Name>
</ProjectReference>
<ProjectReference Include="..\GitHub.VisualStudio.UI\GitHub.VisualStudio.UI.csproj">
<Project>{d1dfbb0c-b570-4302-8f1e-2e3a19c41961}</Project>
<Name>GitHub.VisualStudio.UI</Name>
</ProjectReference>
<ProjectReference Include="..\GitHub.VisualStudio\GitHub.VisualStudio.csproj">
<Project>{11569514-5ae5-4b5b-92a2-f10b0967de5f}</Project>
<Name>GitHub.VisualStudio</Name>
</ProjectReference>
<ProjectReference Include="..\..\submodules\reactiveui\ReactiveUI\ReactiveUI_Net45.csproj">
<Project>{1ce2d235-8072-4649-ba5a-cfb1af8776e0}</Project>
<Name>ReactiveUI_Net45</Name>
</ProjectReference>
<ProjectReference Include="..\..\submodules\splat\Splat\Splat-Net45.csproj">
<Project>{252ce1c2-027a-4445-a3c2-e4d6c80a935a}</Project>
<Name>Splat-Net45</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

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

@ -1,37 +0,0 @@
<Window x:Class="DesignTimeStyleHelper.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:gh="clr-namespace:GitHub.VisualStudio.UI.Views;assembly=GitHub.VisualStudio"
xmlns:local="clr-namespace:DesignTimeStyleHelper"
xmlns:ui="clr-namespace:GitHub.UI;assembly=GitHub.UI"
xmlns:ctl="clr-namespace:GitHub.VisualStudio.UI.Views.Controls;assembly=GitHub.VisualStudio"
xmlns:views="clr-namespace:GitHub.VisualStudio.UI.Views;assembly=GitHub.VisualStudio.UI"
mc:Ignorable="d"
Title="MainWindow" Height="350" Width="525">
<Window.Resources>
<Style TargetType="{x:Type TextBlock}">
<Setter Property="Margin" Value="10,0,0,0" />
</Style>
</Window.Resources>
<StackPanel>
<Border Background="#F5F5F5" >
<views:GitHubHomeContent x:Name="gitHubHomeSection" Margin="0,10,0,10" />
</Border>
<Grid>
<WrapPanel Orientation="Horizontal" Grid.Row="0" Margin="0,0,0,6">
<TextBlock><Hyperlink x:Name="loginLink" Click="loginLink_Click">Login</Hyperlink></TextBlock>
<TextBlock><Hyperlink x:Name="cloneLink" Click="cloneLink_Click">Clone</Hyperlink></TextBlock>
<TextBlock><Hyperlink x:Name="createLink" Click="createLink_Click">Create</Hyperlink></TextBlock>
<TextBlock><Hyperlink x:Name="publishLink" Click="publishLink_Click">Publish</Hyperlink></TextBlock>
<TextBlock><Hyperlink x:Name="twoFactorTester" Click="twoFactorTester_Click">Two Factor</Hyperlink></TextBlock>
</WrapPanel>
</Grid>
<StackPanel x:Name="container">
</StackPanel>
</StackPanel>
</Window>

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

@ -1,59 +0,0 @@
using System;
using System.Windows;
using GitHub.SampleData;
using GitHub.Services;
using GitHub.UI;
using GitHub.Extensions;
using GitHub.Models;
namespace DesignTimeStyleHelper
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
gitHubHomeSection.DataContext = new GitHubHomeSectionDesigner();
}
private void loginLink_Click(object sender, RoutedEventArgs e)
{
ShowDialog(UIControllerFlow.Authentication);
}
private void cloneLink_Click(object sender, RoutedEventArgs e)
{
ShowDialog(UIControllerFlow.Clone);
}
private void createLink_Click(object sender, RoutedEventArgs e)
{
ShowDialog(UIControllerFlow.Create);
}
private void publishLink_Click(object sender, RoutedEventArgs e)
{
ShowDialog(UIControllerFlow.Publish);
}
private void twoFactorTester_Click(object sender, RoutedEventArgs e)
{
var twoFactorTester = new TwoFactorInputTester();
twoFactorTester.ShowDialog();
}
void ShowDialog(UIControllerFlow flow)
{
var ui = App.ServiceProvider.GetService<IUIProvider>();
var controller = ui.Configure(flow);
var userControlObservable = controller.TransitionSignal;
var x = new WindowController(userControlObservable);
userControlObservable.Subscribe(_ => { }, _ => x.Close());
x.Show();
ui.RunInDialog(controller);
}
}
}

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

@ -1,24 +0,0 @@
using System.Reflection;
using System.Windows;
[assembly: AssemblyTitle("DesignTimeStyleHelper")]
[assembly: AssemblyDescription("Helper app for UI testing")]
//In order to begin building localizable applications, set
//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file
//inside a <PropertyGroup>. For example, if you are using US english
//in your source files, set the <UICulture> to en-US. Then uncomment
//the NeutralResourceLanguage attribute below. Update the "en-US" in
//the line below to match the UICulture setting in the project file.
//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
// or application resource dictionaries)
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]

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

@ -1,63 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace DesignTimeStyleHelper.Properties {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("DesignTimeStyleHelper.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
}
}

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

@ -1,117 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

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

@ -1,26 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace DesignTimeStyleHelper.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
}
}

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

@ -1,7 +0,0 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>

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

@ -1,14 +0,0 @@
<Window x:Class="DesignTimeStyleHelper.TwoFactorInputTester"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:DesignTimeStyleHelper"
mc:Ignorable="d"
xmlns:uirx="clr-namespace:GitHub.UI;assembly=GitHub.UI.Reactive"
Title="TwoFactorInputTester" Height="300" Width="300">
<Grid>
<uirx:TwoFactorInput x:Name="twoFactor" />
</Grid>
</Window>

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

@ -1,16 +0,0 @@
using System;
using System.Windows;
namespace DesignTimeStyleHelper
{
/// <summary>
/// Interaction logic for TwoFactorInputTester.xaml
/// </summary>
public partial class TwoFactorInputTester : Window
{
public TwoFactorInputTester()
{
InitializeComponent();
}
}
}

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

@ -1,16 +0,0 @@
<Window x:Class="DesignTimeStyleHelper.WindowController"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:DesignTimeStyleHelper"
mc:Ignorable="d"
Title="WindowController"
Height="440"
Width="414"
MinWidth="414"
MinHeight="440">
<Grid x:Name="Container">
</Grid>
</Window>

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

@ -1,37 +0,0 @@
using GitHub.UI;
using System;
using System.Windows;
using System.Windows.Controls;
namespace DesignTimeStyleHelper
{
/// <summary>
/// Interaction logic for WindowController.xaml
/// </summary>
public partial class WindowController : Window
{
IDisposable disposable;
public WindowController(IObservable<LoadData> controls)
{
InitializeComponent();
disposable = controls.Subscribe(c => Load(c.View),
Close
);
}
protected override void OnClosed(EventArgs e)
{
disposable.Dispose();
base.OnClosed(e);
}
public void Load(IView view)
{
var control = view as UserControl;
Container.Children.Clear();
Container.Children.Add(control);
}
}
}

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

@ -1,13 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.VisualStudio.ComponentModelHost" version="14.0.25424" targetFramework="net461" />
<package id="Microsoft.VisualStudio.Shell.Immutable.10.0" version="10.0.30319" targetFramework="net461" />
<package id="Moq" version="4.2.1312.1319" targetFramework="net45" userInstalled="true" />
<package id="Rothko" version="0.0.2-ghfvs" targetFramework="net461" />
<package id="Rx-Core" version="2.2.5-custom" targetFramework="net45" userInstalled="true" />
<package id="Rx-Interfaces" version="2.2.5-custom" targetFramework="net45" userInstalled="true" />
<package id="Rx-Linq" version="2.2.5-custom" targetFramework="net45" userInstalled="true" />
<package id="Rx-Main" version="2.2.5-custom" targetFramework="net45" userInstalled="true" />
<package id="Rx-PlatformServices" version="2.2.5-custom" targetFramework="net45" userInstalled="true" />
<package id="Rx-XAML" version="2.2.5-custom" targetFramework="net45" userInstalled="true" />
</packages>

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

@ -310,10 +310,6 @@
<Project>{252ce1c2-027a-4445-a3c2-e4d6c80a935a}</Project>
<Name>Splat-Net45</Name>
</ProjectReference>
<ProjectReference Include="..\..\src\DesignTimeStyleHelper\DesignTimeStyleHelper.csproj">
<Project>{b1f5c227-456f-437d-bd5f-4c11b7a8d1a0}</Project>
<Name>DesignTimeStyleHelper</Name>
</ProjectReference>
<ProjectReference Include="..\..\src\GitHub.Api\GitHub.Api.csproj">
<Project>{b389adaf-62cc-486e-85b4-2d8b078df763}</Project>
<Name>GitHub.Api</Name>