Skip to content

A Swiss Army knife for developers.

Added basic architecture

Etienne Baudoux7083b2797676
diff --git a/.gitignore b/.gitignore
index c56d452e1..d40420dab 100644
--- a/.gitignore
+++ b/.gitignore
@@ -33,6 +33,9 @@ Generated\ Files/
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
+# Assembly Info file that is automatically updated on build
+SharedAssemblyInfo.cs
+
# NUNIT
*.VisualState.xml
TestResult.xml
diff --git a/src/DevTools.sln b/src/DevTools.sln
index b67a376a5..7eb0fa5f0 100644
--- a/src/DevTools.sln
+++ b/src/DevTools.sln
@@ -13,18 +13,46 @@ Project("{C7167F0D-BC9F-4E6E-AFE1-012C56B48DB5}") = "DevTools.Startup", "dev\sta
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DevTools.Uwp", "dev\startup\DevTools.Uwp\DevTools.Uwp.csproj", "{E3E4E200-B380-4207-9A7E-4C9421904502}"
EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{B4C026E3-9BBF-434B-A14D-712C6A3731E4}"
+ ProjectSection(SolutionItems) = preProject
+ Directory.Build.props = Directory.Build.props
+ Directory.Build.targets = Directory.Build.targets
+ EndProjectSection
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "def", "def", "{A2C92FF9-1D2E-47C6-8D7D-975412F7F36E}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "impl", "impl", "{AC0D0928-8390-4929-801E-A9923DBB369F}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "shared", "shared", "{EE2227BC-954E-4053-AE38-4AE7A391AEEA}"
+ ProjectSection(SolutionItems) = preProject
+ dev\shared\SharedAssemblyInfo.cs = dev\shared\SharedAssemblyInfo.cs
+ EndProjectSection
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DevTools.Core", "dev\def\DevTools.Core\DevTools.Core.csproj", "{EF6A6707-44F2-4E76-98B8-11C9B40ADC7E}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DevTools.Providers", "dev\def\DevTools.Providers\DevTools.Providers.csproj", "{ADA9988B-E19B-4EE5-9162-DAB3B12BCF9E}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DevTools.Core.Impl", "dev\impl\DevTools.Core.Impl\DevTools.Core.Impl.csproj", "{98274C08-4636-45EE-95AF-2C069BFBABD4}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DevTools.Providers.Impl", "dev\impl\DevTools.Providers.Impl\DevTools.Providers.Impl.csproj", "{8621ED11-E9DD-480A-BE2B-C1DB00919B6F}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DevTools.Localization", "dev\impl\DevTools.Localization\DevTools.Localization.csproj", "{935D5DF8-C400-4CA6-AABE-34A06A69AF85}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
Debug|ARM = Debug|ARM
Debug|ARM64 = Debug|ARM64
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
+ Release|Any CPU = Release|Any CPU
Release|ARM = Release|ARM
Release|ARM64 = Release|ARM64
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {361DB7BC-BE7B-41A2-A29A-978A9E3B4AA7}.Debug|Any CPU.ActiveCfg = Debug|x86
{361DB7BC-BE7B-41A2-A29A-978A9E3B4AA7}.Debug|ARM.ActiveCfg = Debug|ARM
{361DB7BC-BE7B-41A2-A29A-978A9E3B4AA7}.Debug|ARM.Build.0 = Debug|ARM
{361DB7BC-BE7B-41A2-A29A-978A9E3B4AA7}.Debug|ARM.Deploy.0 = Debug|ARM
@@ -37,6 +65,7 @@ Global
{361DB7BC-BE7B-41A2-A29A-978A9E3B4AA7}.Debug|x86.ActiveCfg = Debug|x86
{361DB7BC-BE7B-41A2-A29A-978A9E3B4AA7}.Debug|x86.Build.0 = Debug|x86
{361DB7BC-BE7B-41A2-A29A-978A9E3B4AA7}.Debug|x86.Deploy.0 = Debug|x86
+ {361DB7BC-BE7B-41A2-A29A-978A9E3B4AA7}.Release|Any CPU.ActiveCfg = Release|x86
{361DB7BC-BE7B-41A2-A29A-978A9E3B4AA7}.Release|ARM.ActiveCfg = Release|ARM
{361DB7BC-BE7B-41A2-A29A-978A9E3B4AA7}.Release|ARM.Build.0 = Release|ARM
{361DB7BC-BE7B-41A2-A29A-978A9E3B4AA7}.Release|ARM.Deploy.0 = Release|ARM
@@ -49,6 +78,7 @@ Global
{361DB7BC-BE7B-41A2-A29A-978A9E3B4AA7}.Release|x86.ActiveCfg = Release|x86
{361DB7BC-BE7B-41A2-A29A-978A9E3B4AA7}.Release|x86.Build.0 = Release|x86
{361DB7BC-BE7B-41A2-A29A-978A9E3B4AA7}.Release|x86.Deploy.0 = Release|x86
+ {E3E4E200-B380-4207-9A7E-4C9421904502}.Debug|Any CPU.ActiveCfg = Debug|x86
{E3E4E200-B380-4207-9A7E-4C9421904502}.Debug|ARM.ActiveCfg = Debug|ARM
{E3E4E200-B380-4207-9A7E-4C9421904502}.Debug|ARM.Build.0 = Debug|ARM
{E3E4E200-B380-4207-9A7E-4C9421904502}.Debug|ARM64.ActiveCfg = Debug|ARM64
@@ -57,18 +87,111 @@ Global
{E3E4E200-B380-4207-9A7E-4C9421904502}.Debug|x64.Build.0 = Debug|x64
{E3E4E200-B380-4207-9A7E-4C9421904502}.Debug|x86.ActiveCfg = Debug|x86
{E3E4E200-B380-4207-9A7E-4C9421904502}.Debug|x86.Build.0 = Debug|x86
+ {E3E4E200-B380-4207-9A7E-4C9421904502}.Release|Any CPU.ActiveCfg = Release|x86
{E3E4E200-B380-4207-9A7E-4C9421904502}.Release|ARM.ActiveCfg = Release|ARM
{E3E4E200-B380-4207-9A7E-4C9421904502}.Release|ARM.Build.0 = Release|ARM
- {E3E4E200-B380-4207-9A7E-4C9421904502}.Release|ARM.Deploy.0 = Release|ARM
{E3E4E200-B380-4207-9A7E-4C9421904502}.Release|ARM64.ActiveCfg = Release|ARM64
{E3E4E200-B380-4207-9A7E-4C9421904502}.Release|ARM64.Build.0 = Release|ARM64
- {E3E4E200-B380-4207-9A7E-4C9421904502}.Release|ARM64.Deploy.0 = Release|ARM64
{E3E4E200-B380-4207-9A7E-4C9421904502}.Release|x64.ActiveCfg = Release|x64
{E3E4E200-B380-4207-9A7E-4C9421904502}.Release|x64.Build.0 = Release|x64
- {E3E4E200-B380-4207-9A7E-4C9421904502}.Release|x64.Deploy.0 = Release|x64
{E3E4E200-B380-4207-9A7E-4C9421904502}.Release|x86.ActiveCfg = Release|x86
{E3E4E200-B380-4207-9A7E-4C9421904502}.Release|x86.Build.0 = Release|x86
- {E3E4E200-B380-4207-9A7E-4C9421904502}.Release|x86.Deploy.0 = Release|x86
+ {EF6A6707-44F2-4E76-98B8-11C9B40ADC7E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {EF6A6707-44F2-4E76-98B8-11C9B40ADC7E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {EF6A6707-44F2-4E76-98B8-11C9B40ADC7E}.Debug|ARM.ActiveCfg = Debug|Any CPU
+ {EF6A6707-44F2-4E76-98B8-11C9B40ADC7E}.Debug|ARM.Build.0 = Debug|Any CPU
+ {EF6A6707-44F2-4E76-98B8-11C9B40ADC7E}.Debug|ARM64.ActiveCfg = Debug|Any CPU
+ {EF6A6707-44F2-4E76-98B8-11C9B40ADC7E}.Debug|ARM64.Build.0 = Debug|Any CPU
+ {EF6A6707-44F2-4E76-98B8-11C9B40ADC7E}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {EF6A6707-44F2-4E76-98B8-11C9B40ADC7E}.Debug|x64.Build.0 = Debug|Any CPU
+ {EF6A6707-44F2-4E76-98B8-11C9B40ADC7E}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {EF6A6707-44F2-4E76-98B8-11C9B40ADC7E}.Debug|x86.Build.0 = Debug|Any CPU
+ {EF6A6707-44F2-4E76-98B8-11C9B40ADC7E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {EF6A6707-44F2-4E76-98B8-11C9B40ADC7E}.Release|Any CPU.Build.0 = Release|Any CPU
+ {EF6A6707-44F2-4E76-98B8-11C9B40ADC7E}.Release|ARM.ActiveCfg = Release|Any CPU
+ {EF6A6707-44F2-4E76-98B8-11C9B40ADC7E}.Release|ARM.Build.0 = Release|Any CPU
+ {EF6A6707-44F2-4E76-98B8-11C9B40ADC7E}.Release|ARM64.ActiveCfg = Release|Any CPU
+ {EF6A6707-44F2-4E76-98B8-11C9B40ADC7E}.Release|ARM64.Build.0 = Release|Any CPU
+ {EF6A6707-44F2-4E76-98B8-11C9B40ADC7E}.Release|x64.ActiveCfg = Release|Any CPU
+ {EF6A6707-44F2-4E76-98B8-11C9B40ADC7E}.Release|x64.Build.0 = Release|Any CPU
+ {EF6A6707-44F2-4E76-98B8-11C9B40ADC7E}.Release|x86.ActiveCfg = Release|Any CPU
+ {EF6A6707-44F2-4E76-98B8-11C9B40ADC7E}.Release|x86.Build.0 = Release|Any CPU
+ {ADA9988B-E19B-4EE5-9162-DAB3B12BCF9E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {ADA9988B-E19B-4EE5-9162-DAB3B12BCF9E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {ADA9988B-E19B-4EE5-9162-DAB3B12BCF9E}.Debug|ARM.ActiveCfg = Debug|Any CPU
+ {ADA9988B-E19B-4EE5-9162-DAB3B12BCF9E}.Debug|ARM.Build.0 = Debug|Any CPU
+ {ADA9988B-E19B-4EE5-9162-DAB3B12BCF9E}.Debug|ARM64.ActiveCfg = Debug|Any CPU
+ {ADA9988B-E19B-4EE5-9162-DAB3B12BCF9E}.Debug|ARM64.Build.0 = Debug|Any CPU
+ {ADA9988B-E19B-4EE5-9162-DAB3B12BCF9E}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {ADA9988B-E19B-4EE5-9162-DAB3B12BCF9E}.Debug|x64.Build.0 = Debug|Any CPU
+ {ADA9988B-E19B-4EE5-9162-DAB3B12BCF9E}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {ADA9988B-E19B-4EE5-9162-DAB3B12BCF9E}.Debug|x86.Build.0 = Debug|Any CPU
+ {ADA9988B-E19B-4EE5-9162-DAB3B12BCF9E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {ADA9988B-E19B-4EE5-9162-DAB3B12BCF9E}.Release|Any CPU.Build.0 = Release|Any CPU
+ {ADA9988B-E19B-4EE5-9162-DAB3B12BCF9E}.Release|ARM.ActiveCfg = Release|Any CPU
+ {ADA9988B-E19B-4EE5-9162-DAB3B12BCF9E}.Release|ARM.Build.0 = Release|Any CPU
+ {ADA9988B-E19B-4EE5-9162-DAB3B12BCF9E}.Release|ARM64.ActiveCfg = Release|Any CPU
+ {ADA9988B-E19B-4EE5-9162-DAB3B12BCF9E}.Release|ARM64.Build.0 = Release|Any CPU
+ {ADA9988B-E19B-4EE5-9162-DAB3B12BCF9E}.Release|x64.ActiveCfg = Release|Any CPU
+ {ADA9988B-E19B-4EE5-9162-DAB3B12BCF9E}.Release|x64.Build.0 = Release|Any CPU
+ {ADA9988B-E19B-4EE5-9162-DAB3B12BCF9E}.Release|x86.ActiveCfg = Release|Any CPU
+ {ADA9988B-E19B-4EE5-9162-DAB3B12BCF9E}.Release|x86.Build.0 = Release|Any CPU
+ {98274C08-4636-45EE-95AF-2C069BFBABD4}.Debug|Any CPU.ActiveCfg = Debug|x86
+ {98274C08-4636-45EE-95AF-2C069BFBABD4}.Debug|ARM.ActiveCfg = Debug|ARM
+ {98274C08-4636-45EE-95AF-2C069BFBABD4}.Debug|ARM.Build.0 = Debug|ARM
+ {98274C08-4636-45EE-95AF-2C069BFBABD4}.Debug|ARM64.ActiveCfg = Debug|ARM64
+ {98274C08-4636-45EE-95AF-2C069BFBABD4}.Debug|ARM64.Build.0 = Debug|ARM64
+ {98274C08-4636-45EE-95AF-2C069BFBABD4}.Debug|x64.ActiveCfg = Debug|x64
+ {98274C08-4636-45EE-95AF-2C069BFBABD4}.Debug|x64.Build.0 = Debug|x64
+ {98274C08-4636-45EE-95AF-2C069BFBABD4}.Debug|x86.ActiveCfg = Debug|x86
+ {98274C08-4636-45EE-95AF-2C069BFBABD4}.Debug|x86.Build.0 = Debug|x86
+ {98274C08-4636-45EE-95AF-2C069BFBABD4}.Release|Any CPU.ActiveCfg = Release|x86
+ {98274C08-4636-45EE-95AF-2C069BFBABD4}.Release|ARM.ActiveCfg = Release|ARM
+ {98274C08-4636-45EE-95AF-2C069BFBABD4}.Release|ARM.Build.0 = Release|ARM
+ {98274C08-4636-45EE-95AF-2C069BFBABD4}.Release|ARM64.ActiveCfg = Release|ARM64
+ {98274C08-4636-45EE-95AF-2C069BFBABD4}.Release|ARM64.Build.0 = Release|ARM64
+ {98274C08-4636-45EE-95AF-2C069BFBABD4}.Release|x64.ActiveCfg = Release|x64
+ {98274C08-4636-45EE-95AF-2C069BFBABD4}.Release|x64.Build.0 = Release|x64
+ {98274C08-4636-45EE-95AF-2C069BFBABD4}.Release|x86.ActiveCfg = Release|x86
+ {98274C08-4636-45EE-95AF-2C069BFBABD4}.Release|x86.Build.0 = Release|x86
+ {8621ED11-E9DD-480A-BE2B-C1DB00919B6F}.Debug|Any CPU.ActiveCfg = Debug|x86
+ {8621ED11-E9DD-480A-BE2B-C1DB00919B6F}.Debug|ARM.ActiveCfg = Debug|ARM
+ {8621ED11-E9DD-480A-BE2B-C1DB00919B6F}.Debug|ARM.Build.0 = Debug|ARM
+ {8621ED11-E9DD-480A-BE2B-C1DB00919B6F}.Debug|ARM64.ActiveCfg = Debug|ARM64
+ {8621ED11-E9DD-480A-BE2B-C1DB00919B6F}.Debug|ARM64.Build.0 = Debug|ARM64
+ {8621ED11-E9DD-480A-BE2B-C1DB00919B6F}.Debug|x64.ActiveCfg = Debug|x64
+ {8621ED11-E9DD-480A-BE2B-C1DB00919B6F}.Debug|x64.Build.0 = Debug|x64
+ {8621ED11-E9DD-480A-BE2B-C1DB00919B6F}.Debug|x86.ActiveCfg = Debug|x86
+ {8621ED11-E9DD-480A-BE2B-C1DB00919B6F}.Debug|x86.Build.0 = Debug|x86
+ {8621ED11-E9DD-480A-BE2B-C1DB00919B6F}.Release|Any CPU.ActiveCfg = Release|x86
+ {8621ED11-E9DD-480A-BE2B-C1DB00919B6F}.Release|ARM.ActiveCfg = Release|ARM
+ {8621ED11-E9DD-480A-BE2B-C1DB00919B6F}.Release|ARM.Build.0 = Release|ARM
+ {8621ED11-E9DD-480A-BE2B-C1DB00919B6F}.Release|ARM64.ActiveCfg = Release|ARM64
+ {8621ED11-E9DD-480A-BE2B-C1DB00919B6F}.Release|ARM64.Build.0 = Release|ARM64
+ {8621ED11-E9DD-480A-BE2B-C1DB00919B6F}.Release|x64.ActiveCfg = Release|x64
+ {8621ED11-E9DD-480A-BE2B-C1DB00919B6F}.Release|x64.Build.0 = Release|x64
+ {8621ED11-E9DD-480A-BE2B-C1DB00919B6F}.Release|x86.ActiveCfg = Release|x86
+ {8621ED11-E9DD-480A-BE2B-C1DB00919B6F}.Release|x86.Build.0 = Release|x86
+ {935D5DF8-C400-4CA6-AABE-34A06A69AF85}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {935D5DF8-C400-4CA6-AABE-34A06A69AF85}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {935D5DF8-C400-4CA6-AABE-34A06A69AF85}.Debug|ARM.ActiveCfg = Debug|ARM
+ {935D5DF8-C400-4CA6-AABE-34A06A69AF85}.Debug|ARM.Build.0 = Debug|ARM
+ {935D5DF8-C400-4CA6-AABE-34A06A69AF85}.Debug|ARM64.ActiveCfg = Debug|ARM64
+ {935D5DF8-C400-4CA6-AABE-34A06A69AF85}.Debug|ARM64.Build.0 = Debug|ARM64
+ {935D5DF8-C400-4CA6-AABE-34A06A69AF85}.Debug|x64.ActiveCfg = Debug|x64
+ {935D5DF8-C400-4CA6-AABE-34A06A69AF85}.Debug|x64.Build.0 = Debug|x64
+ {935D5DF8-C400-4CA6-AABE-34A06A69AF85}.Debug|x86.ActiveCfg = Debug|x86
+ {935D5DF8-C400-4CA6-AABE-34A06A69AF85}.Debug|x86.Build.0 = Debug|x86
+ {935D5DF8-C400-4CA6-AABE-34A06A69AF85}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {935D5DF8-C400-4CA6-AABE-34A06A69AF85}.Release|Any CPU.Build.0 = Release|Any CPU
+ {935D5DF8-C400-4CA6-AABE-34A06A69AF85}.Release|ARM.ActiveCfg = Release|ARM
+ {935D5DF8-C400-4CA6-AABE-34A06A69AF85}.Release|ARM.Build.0 = Release|ARM
+ {935D5DF8-C400-4CA6-AABE-34A06A69AF85}.Release|ARM64.ActiveCfg = Release|ARM64
+ {935D5DF8-C400-4CA6-AABE-34A06A69AF85}.Release|ARM64.Build.0 = Release|ARM64
+ {935D5DF8-C400-4CA6-AABE-34A06A69AF85}.Release|x64.ActiveCfg = Release|x64
+ {935D5DF8-C400-4CA6-AABE-34A06A69AF85}.Release|x64.Build.0 = Release|x64
+ {935D5DF8-C400-4CA6-AABE-34A06A69AF85}.Release|x86.ActiveCfg = Release|x86
+ {935D5DF8-C400-4CA6-AABE-34A06A69AF85}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -77,6 +200,14 @@ Global
{93B72B9C-08BA-4838-9163-3ED67EC3EB9F} = {2C2B8C64-7BA1-4244-86E1-48CA7D85D7D9}
{361DB7BC-BE7B-41A2-A29A-978A9E3B4AA7} = {93B72B9C-08BA-4838-9163-3ED67EC3EB9F}
{E3E4E200-B380-4207-9A7E-4C9421904502} = {93B72B9C-08BA-4838-9163-3ED67EC3EB9F}
+ {A2C92FF9-1D2E-47C6-8D7D-975412F7F36E} = {2C2B8C64-7BA1-4244-86E1-48CA7D85D7D9}
+ {AC0D0928-8390-4929-801E-A9923DBB369F} = {2C2B8C64-7BA1-4244-86E1-48CA7D85D7D9}
+ {EE2227BC-954E-4053-AE38-4AE7A391AEEA} = {2C2B8C64-7BA1-4244-86E1-48CA7D85D7D9}
+ {EF6A6707-44F2-4E76-98B8-11C9B40ADC7E} = {A2C92FF9-1D2E-47C6-8D7D-975412F7F36E}
+ {ADA9988B-E19B-4EE5-9162-DAB3B12BCF9E} = {A2C92FF9-1D2E-47C6-8D7D-975412F7F36E}
+ {98274C08-4636-45EE-95AF-2C069BFBABD4} = {AC0D0928-8390-4929-801E-A9923DBB369F}
+ {8621ED11-E9DD-480A-BE2B-C1DB00919B6F} = {AC0D0928-8390-4929-801E-A9923DBB369F}
+ {935D5DF8-C400-4CA6-AABE-34A06A69AF85} = {AC0D0928-8390-4929-801E-A9923DBB369F}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {78B10789-385B-4F7D-8E06-D86143CD76B5}
diff --git a/src/Directory.Build.props b/src/Directory.Build.props
index 01f87ae1c..707f51e77 100644
--- a/src/Directory.Build.props
+++ b/src/Directory.Build.props
@@ -1,4 +1,5 @@
<Project>
+
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x64</Platform>
@@ -6,6 +7,9 @@
<Windows10SDKVersion>10.0.19041.0</Windows10SDKVersion>
<Windows10MinSDKVersion>10.0.16299.0</Windows10MinSDKVersion>
<LangVersion>latest</LangVersion>
+ <Nullable>enable</Nullable>
+
+ <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<!-- Defines the bin and obj folder paths -->
<RepoRoot>$([System.IO.Path]::GetDirectoryName($([MSBuild]::GetPathOfFileAbove('.gitignore', '$(MSBuildThisFileDirectory)'))))\</RepoRoot>
@@ -32,4 +36,16 @@
<PropertyGroup>
<RestoreProjectStyle>PackageReference</RestoreProjectStyle>
</PropertyGroup>
+
+ <PropertyGroup>
+ <NuGet_MicrosoftNETCoreUniversalWindowsPlatform>6.2.12</NuGet_MicrosoftNETCoreUniversalWindowsPlatform>
+ <NuGet_MicrosoftToolkitMvvm>7.0.2</NuGet_MicrosoftToolkitMvvm>
+ <NuGet_MicrosoftUIXaml>2.6.2</NuGet_MicrosoftUIXaml>
+ <NuGet_MicrosoftWindowsSDKBuildTools>10.0.19041.8</NuGet_MicrosoftWindowsSDKBuildTools>
+ <NuGet_MSTestTestAdapter>2.1.1</NuGet_MSTestTestAdapter>
+ <NuGet_MSTestTestFramework>2.1.1</NuGet_MSTestTestFramework>
+ <NuGet_NewtonsoftJson>12.0.3</NuGet_NewtonsoftJson>
+ <NuGet_SystemComposition>5.0.0</NuGet_SystemComposition>
+ <NuGet_SystemRuntimeCompilerServicesUnsafe>5.0.0</NuGet_SystemRuntimeCompilerServicesUnsafe>
+ </PropertyGroup>
</Project>
\ No newline at end of file
diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets
index 2d8e3a3f6..fbb34b296 100644
--- a/src/Directory.Build.targets
+++ b/src/Directory.Build.targets
@@ -1,14 +1,6 @@
<Project>
<ItemGroup>
- <PackageReference Include="Newtonsoft.Json">
- <Version>12.0.3</Version>
- </PackageReference>
- <PackageReference Include="System.Composition">
- <Version>5.0.0</Version>
- </PackageReference>
- <PackageReference Include="System.Runtime.CompilerServices.Unsafe">
- <Version>5.0.0</Version>
- </PackageReference>
+ <PackageReference Include="Newtonsoft.Json" Version="$(NuGet_NewtonsoftJson)"/>
</ItemGroup>
<!-- Update Assembly Version info on build -->
diff --git a/src/dev/def/DevTools.Core/DevTools.Core.csproj b/src/dev/def/DevTools.Core/DevTools.Core.csproj
new file mode 100644
index 000000000..5c38593f9
--- /dev/null
+++ b/src/dev/def/DevTools.Core/DevTools.Core.csproj
@@ -0,0 +1,12 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <TargetFramework>netstandard2.0</TargetFramework>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="..\..\shared\SharedAssemblyInfo.cs">
+ <Link>Properties\SharedAssemblyInfo.cs</Link>
+ </Compile>
+ </ItemGroup>
+
+</Project>
diff --git a/src/dev/def/DevTools.Core/Injection/IMefProvider.cs b/src/dev/def/DevTools.Core/Injection/IMefProvider.cs
new file mode 100644
index 000000000..86e8fa6cc
--- /dev/null
+++ b/src/dev/def/DevTools.Core/Injection/IMefProvider.cs
@@ -0,0 +1,20 @@
+using System.Collections.Generic;
+
+namespace DevTools.Core.Injection
+{
+ /// <summary>
+ /// Provides a way to import MEF components on the fly/
+ /// </summary>
+ public interface IMefProvider
+ {
+ /// <summary>
+ /// Imports the given type.
+ /// </summary>
+ TExport Import<TExport>();
+
+ /// <summary>
+ /// Imports the given type.
+ /// </summary>
+ IEnumerable<TExport> ImportMany<TExport>();
+ }
+}
diff --git a/src/dev/def/DevTools.Core/Properties/AssemblyInfo.cs b/src/dev/def/DevTools.Core/Properties/AssemblyInfo.cs
new file mode 100644
index 000000000..d328d9624
--- /dev/null
+++ b/src/dev/def/DevTools.Core/Properties/AssemblyInfo.cs
@@ -0,0 +1,3 @@
+using System.Reflection;
+
+[assembly: AssemblyTitle("DevTools.Core")]
\ No newline at end of file
diff --git a/src/dev/def/DevTools.Core/Settings/ISettingsProvider.cs b/src/dev/def/DevTools.Core/Settings/ISettingsProvider.cs
new file mode 100644
index 000000000..69e2bf84b
--- /dev/null
+++ b/src/dev/def/DevTools.Core/Settings/ISettingsProvider.cs
@@ -0,0 +1,29 @@
+namespace DevTools.Core.Settings
+{
+ /// <summary>
+ /// Provides a set of methods to manage the application's settings.
+ /// </summary>
+ public interface ISettingsProvider
+ {
+ /// <summary>
+ /// Gets the value of a defined setting.
+ /// </summary>
+ /// <typeparam name="T">The type of value that will be retrieved.</typeparam>
+ /// <param name="settingDefinition">The <see cref="SettingDefinition{T}"/> that defines the targetted setting.</param>
+ /// <returns>Return the value of the setting or its default value.</returns>
+ T GetSetting<T>(SettingDefinition<T> settingDefinition);
+
+ /// <summary>
+ /// Sets the value of a given setting.
+ /// </summary>
+ /// <typeparam name="T">The type of value that will be set.</typeparam>
+ /// <param name="settingDefinition">The <see cref="SettingDefinition{T}"/> that defines the targetted setting.</param>
+ /// <param name="value">The value to set</param>
+ void SetSetting<T>(SettingDefinition<T> settingDefinition, T value);
+
+ /// <summary>
+ /// Resets a given setting to its default value.
+ /// </summary>
+ void ResetSetting<T>(SettingDefinition<T> settingDefinition);
+ }
+}
diff --git a/src/dev/def/DevTools.Core/Settings/SettingDefinition.cs b/src/dev/def/DevTools.Core/Settings/SettingDefinition.cs
new file mode 100644
index 000000000..d6fc59b38
--- /dev/null
+++ b/src/dev/def/DevTools.Core/Settings/SettingDefinition.cs
@@ -0,0 +1,74 @@
+using System;
+
+namespace DevTools.Core.Settings
+{
+ /// <summary>
+ /// Represents the definition of a setting in the application.
+ /// </summary>
+ /// <typeparam name="T">The type of value of the setting</typeparam>
+ public readonly struct SettingDefinition<T> : IEquatable<SettingDefinition<T>>
+ {
+ /// <summary>
+ /// Gets whether the setting can be synchronized with the user's Microsoft account.
+ /// </summary>
+ public bool IsRoaming { get; }
+
+ /// <summary>
+ /// Gets the name of the setting.
+ /// </summary>
+ public string Name { get; }
+
+ /// <summary>
+ /// Gets the default value of the setting.
+ /// </summary>
+ public T DefaultValue { get; }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="SettingDefinition"/> structure.
+ /// </summary>
+ /// <param name="name">The name of the setting. Should be unique.</param>
+ /// <param name="isRoaming">Defines whether the setting can be synchronized with the user's Microsoft account.</param>
+ /// <param name="defaultValue">The default value of the setting.</param>
+ public SettingDefinition(string name, bool isRoaming, T defaultValue)
+ {
+ IsRoaming = isRoaming;
+ Name = name;
+ DefaultValue = defaultValue;
+ }
+
+ public override bool Equals(object? obj)
+ {
+ if (obj is SettingDefinition<T> definition)
+ {
+ return Equals(definition);
+ }
+
+ return false;
+ }
+
+ public bool Equals(SettingDefinition<T> other)
+ {
+ return other.IsRoaming == IsRoaming
+ && string.Equals(other.Name, Name, StringComparison.Ordinal)
+ && other.DefaultValue is not null
+ && other.DefaultValue.Equals(DefaultValue);
+ }
+
+ public override int GetHashCode()
+ {
+ return (IsRoaming.GetHashCode() ^ 137)
+ * (Name.GetHashCode() ^ 47)
+ * (DefaultValue is null ? 13 : DefaultValue.GetHashCode() ^ 73);
+ }
+
+ public static bool operator ==(SettingDefinition<T> left, SettingDefinition<T> right)
+ {
+ return left.Equals(right);
+ }
+
+ public static bool operator !=(SettingDefinition<T> left, SettingDefinition<T> right)
+ {
+ return !(left == right);
+ }
+ }
+}
diff --git a/src/dev/def/DevTools.Providers/DevTools.Providers.csproj b/src/dev/def/DevTools.Providers/DevTools.Providers.csproj
new file mode 100644
index 000000000..5c38593f9
--- /dev/null
+++ b/src/dev/def/DevTools.Providers/DevTools.Providers.csproj
@@ -0,0 +1,12 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <TargetFramework>netstandard2.0</TargetFramework>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="..\..\shared\SharedAssemblyInfo.cs">
+ <Link>Properties\SharedAssemblyInfo.cs</Link>
+ </Compile>
+ </ItemGroup>
+
+</Project>
diff --git a/src/dev/def/DevTools.Providers/Properties/AssemblyInfo.cs b/src/dev/def/DevTools.Providers/Properties/AssemblyInfo.cs
new file mode 100644
index 000000000..8f703dc61
--- /dev/null
+++ b/src/dev/def/DevTools.Providers/Properties/AssemblyInfo.cs
@@ -0,0 +1,3 @@
+using System.Reflection;
+
+[assembly: AssemblyTitle("DevTools.Providers")]
\ No newline at end of file
diff --git a/src/dev/impl/DevTools.Core.Impl/DevTools.Core.Impl.csproj b/src/dev/impl/DevTools.Core.Impl/DevTools.Core.Impl.csproj
new file mode 100644
index 000000000..d4b6bf7fb
--- /dev/null
+++ b/src/dev/impl/DevTools.Core.Impl/DevTools.Core.Impl.csproj
@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="15.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>
+ <ProjectGuid>{98274C08-4636-45EE-95AF-2C069BFBABD4}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>DevTools.Core.Impl</RootNamespace>
+ <AssemblyName>DevTools.Core.Impl</AssemblyName>
+ <DefaultLanguage>en-US</DefaultLanguage>
+ <TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
+ <TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">$(Windows10SDKVersion)</TargetPlatformVersion>
+ <TargetPlatformMinVersion>$(Windows10MinSDKVersion)</TargetPlatformMinVersion>
+ <MinimumVisualStudioVersion>16</MinimumVisualStudioVersion>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <WindowsXamlEnableOverview>true</WindowsXamlEnableOverview>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
+ <DebugSymbols>true</DebugSymbols>
+ <DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
+ <DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM'">
+ <DebugSymbols>true</DebugSymbols>
+ <DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>ARM</PlatformTarget>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM'">
+ <DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>ARM</PlatformTarget>
+ <UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM64'">
+ <DebugSymbols>true</DebugSymbols>
+ <DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>ARM64</PlatformTarget>
+ <UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM64'">
+ <DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>ARM64</PlatformTarget>
+ <UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
+ <DebugSymbols>true</DebugSymbols>
+ <DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
+ <DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="..\..\shared\SharedAssemblyInfo.cs">
+ <Link>Properties\SharedAssemblyInfo.cs</Link>
+ </Compile>
+ <Compile Include="Injection\MefComposer.cs" />
+ <Compile Include="Injection\MefProvider.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="Settings\SettingsProvider.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform" Version="$(NuGet_MicrosoftNETCoreUniversalWindowsPlatform)" />
+ <PackageReference Include="Microsoft.Toolkit.Mvvm" Version="$(NuGet_MicrosoftToolkitMvvm)" />
+ <PackageReference Include="Microsoft.UI.Xaml" Version="$(NuGet_MicrosoftUIXaml)" />
+ <PackageReference Include="System.Composition" Version="$(NuGet_SystemComposition)" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\def\DevTools.Core\DevTools.Core.csproj">
+ <Project>{ef6a6707-44f2-4e76-98b8-11c9b40adc7e}</Project>
+ <Name>DevTools.Core</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\def\DevTools.Providers\DevTools.Providers.csproj">
+ <Project>{ada9988b-e19b-4ee5-9162-dab3b12bcf9e}</Project>
+ <Name>DevTools.Providers</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\DevTools.Localization\DevTools.Localization.csproj">
+ <Project>{935d5df8-c400-4ca6-aabe-34a06a69af85}</Project>
+ <Name>DevTools.Localization</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.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>
\ No newline at end of file
diff --git a/src/dev/impl/DevTools.Core.Impl/Injection/MefComposer.cs b/src/dev/impl/DevTools.Core.Impl/Injection/MefComposer.cs
new file mode 100644
index 000000000..f180387c6
--- /dev/null
+++ b/src/dev/impl/DevTools.Core.Impl/Injection/MefComposer.cs
@@ -0,0 +1,76 @@
+#nullable enable
+
+using DevTools.Core.Injection;
+using System;
+using System.Collections.Generic;
+using System.Composition.Hosting;
+using System.Reflection;
+
+namespace DevTools.Core.Impl.Injection
+{
+ /// <summary>
+ /// Provides a set of methods to initialize and manage MEF.
+ /// </summary>
+ public sealed class MefComposer : IDisposable
+ {
+ private readonly Assembly[] _assemblies;
+ private bool isExportProviderDisposed = true;
+
+ public static IMefProvider Provider { get; private set; } = null!;
+
+ public CompositionHost ExportProvider { get; private set; }
+
+ public MefComposer(params Assembly[] assemblies)
+ {
+ if (Provider is not null)
+ {
+ throw new InvalidOperationException("Mef composer already initialized.");
+ }
+
+ _assemblies = assemblies;
+ ExportProvider = InitializeMef();
+
+ Provider = ExportProvider.GetExport<IMefProvider>();
+ ((MefProvider)Provider).ExportProvider = ExportProvider;
+ }
+
+ public void Dispose()
+ {
+ if (ExportProvider is not null)
+ {
+ ExportProvider.Dispose();
+ }
+
+#pragma warning disable CS8625 // Cannot convert null literal to non-nullable reference type.
+ Provider = null;
+#pragma warning restore CS8625 // Cannot convert null literal to non-nullable reference type.
+ isExportProviderDisposed = true;
+ }
+
+ internal void Reset()
+ {
+ // For unit tests.
+ Dispose();
+ InitializeMef();
+ }
+
+ private CompositionHost InitializeMef()
+ {
+ if (!isExportProviderDisposed)
+ {
+ return ExportProvider;
+ }
+
+ var assemblies = new HashSet<Assembly>(_assemblies);
+
+ var configuration = new ContainerConfiguration()
+ .WithAssemblies(assemblies);
+
+ ExportProvider = configuration.CreateContainer();
+
+ isExportProviderDisposed = false;
+
+ return ExportProvider;
+ }
+ }
+}
diff --git a/src/dev/impl/DevTools.Core.Impl/Injection/MefProvider.cs b/src/dev/impl/DevTools.Core.Impl/Injection/MefProvider.cs
new file mode 100644
index 000000000..a39c4587e
--- /dev/null
+++ b/src/dev/impl/DevTools.Core.Impl/Injection/MefProvider.cs
@@ -0,0 +1,26 @@
+#nullable enable
+
+using DevTools.Core.Injection;
+using System.Collections.Generic;
+using System.Composition;
+using System.Composition.Hosting;
+
+namespace DevTools.Core.Impl.Injection
+{
+ [Export(typeof(IMefProvider))]
+ [Shared]
+ internal sealed class MefProvider : IMefProvider
+ {
+ internal CompositionHost? ExportProvider { get; set; }
+
+ public TExport Import<TExport>()
+ {
+ return ExportProvider!.GetExport<TExport>();
+ }
+
+ public IEnumerable<TExport> ImportMany<TExport>()
+ {
+ return ExportProvider!.GetExports<TExport>();
+ }
+ }
+}
diff --git a/src/dev/impl/DevTools.Core.Impl/Properties/AssemblyInfo.cs b/src/dev/impl/DevTools.Core.Impl/Properties/AssemblyInfo.cs
new file mode 100644
index 000000000..c57cfb24a
--- /dev/null
+++ b/src/dev/impl/DevTools.Core.Impl/Properties/AssemblyInfo.cs
@@ -0,0 +1,3 @@
+using System.Reflection;
+
+[assembly: AssemblyTitle("DevTools.Core.Impl")]
\ No newline at end of file
diff --git a/src/dev/impl/DevTools.Core.Impl/Settings/SettingsProvider.cs b/src/dev/impl/DevTools.Core.Impl/Settings/SettingsProvider.cs
new file mode 100644
index 000000000..5d9eec7a4
--- /dev/null
+++ b/src/dev/impl/DevTools.Core.Impl/Settings/SettingsProvider.cs
@@ -0,0 +1,84 @@
+#nullable enable
+
+using DevTools.Core.Settings;
+using Newtonsoft.Json;
+using System;
+using System.Collections;
+using System.Composition;
+using System.Globalization;
+using Windows.Storage;
+
+namespace DevTools.Core.Impl.Settings
+{
+ [Export(typeof(ISettingsProvider))]
+ [Shared]
+ internal sealed class SettingsProvider : ISettingsProvider
+ {
+ private readonly ApplicationDataContainer _roamingSettings = ApplicationData.Current.RoamingSettings;
+ private readonly ApplicationDataContainer _localSettings = ApplicationData.Current.LocalSettings;
+
+ public T GetSetting<T>(SettingDefinition<T> settingDefinition)
+ {
+ ApplicationDataContainer applicationDataContainer;
+ if (settingDefinition.IsRoaming)
+ {
+ applicationDataContainer = _roamingSettings;
+ }
+ else
+ {
+ applicationDataContainer = _localSettings;
+ }
+
+ if (applicationDataContainer.Values.ContainsKey(settingDefinition.Name))
+ {
+ if (typeof(T).IsEnum)
+ {
+ return (T)Enum.Parse(typeof(T), applicationDataContainer.Values[settingDefinition.Name]?.ToString() ?? string.Empty);
+ }
+ else if (typeof(IList).IsAssignableFrom(typeof(T)))
+ {
+ return JsonConvert.DeserializeObject<T>(applicationDataContainer.Values[settingDefinition.Name]?.ToString() ?? string.Empty);
+ }
+
+ return (T)Convert.ChangeType(applicationDataContainer.Values[settingDefinition.Name], typeof(T), CultureInfo.InvariantCulture);
+ }
+
+ SetSetting(settingDefinition, settingDefinition.DefaultValue);
+ return settingDefinition.DefaultValue;
+ }
+
+ public void SetSetting<T>(SettingDefinition<T> settingDefinition, T value)
+ {
+ object? valueToSave = value;
+ if (value is Enum valueEnum)
+ {
+ valueToSave = valueEnum.ToString();
+ }
+ else if (value is IList list)
+ {
+ valueToSave = JsonConvert.SerializeObject(list, Formatting.None);
+ }
+
+ if (settingDefinition.IsRoaming)
+ {
+ _roamingSettings.Values[settingDefinition.Name] = valueToSave;
+ }
+ else
+ {
+ _localSettings.Values[settingDefinition.Name] = valueToSave;
+ }
+ }
+
+ public void ResetSetting<T>(SettingDefinition<T> settingDefinition)
+ {
+ if (settingDefinition.IsRoaming)
+ {
+ _roamingSettings.Values.Remove(settingDefinition.Name);
+ }
+ else
+ {
+ _localSettings.Values.Remove(settingDefinition.Name);
+ }
+ }
+ }
+}
diff --git a/src/dev/impl/DevTools.Localization/DevTools.Localization.csproj b/src/dev/impl/DevTools.Localization/DevTools.Localization.csproj
new file mode 100644
index 000000000..711fbe15c
--- /dev/null
+++ b/src/dev/impl/DevTools.Localization/DevTools.Localization.csproj
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="15.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>{935D5DF8-C400-4CA6-AABE-34A06A69AF85}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>DevTools.Localization</RootNamespace>
+ <AssemblyName>DevTools.Localization</AssemblyName>
+ <DefaultLanguage>en</DefaultLanguage>
+ <TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
+ <TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">$(Windows10SDKVersion)</TargetPlatformVersion>
+ <TargetPlatformMinVersion>$(Windows10MinSDKVersion)</TargetPlatformMinVersion>
+ <MinimumVisualStudioVersion>16</MinimumVisualStudioVersion>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
+ <DebugSymbols>true</DebugSymbols>
+ <DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
+ <DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM'">
+ <DebugSymbols>true</DebugSymbols>
+ <DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>ARM</PlatformTarget>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM'">
+ <DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>ARM</PlatformTarget>
+ <UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM64'">
+ <DebugSymbols>true</DebugSymbols>
+ <DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>ARM64</PlatformTarget>
+ <UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM64'">
+ <DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>ARM64</PlatformTarget>
+ <UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
+ <DebugSymbols>true</DebugSymbols>
+ <DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
+ <DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="..\..\shared\SharedAssemblyInfo.cs">
+ <Link>Properties\SharedAssemblyInfo.cs</Link>
+ </Compile>
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="LanguageManager.cs">
+ <DependentUpon>LanguageManager.tt</DependentUpon>
+ <AutoGen>True</AutoGen>
+ <DesignTime>True</DesignTime>
+ </Compile>
+ <Content Include="LanguageManager.tt">
+ <Generator>TextTemplatingFileGenerator</Generator>
+ <LastGenOutput>LanguageManager.cs</LastGenOutput>
+ </Content>
+ <PRIResource Include="Strings\en\MainPage.resw" />
+ </ItemGroup>
+ <ItemGroup>
+ <PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform" Version="$(NuGet_MicrosoftNETCoreUniversalWindowsPlatform)" />
+ <PackageReference Include="Microsoft.Toolkit.Mvvm" Version="$(NuGet_MicrosoftToolkitMvvm)" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
+ </ItemGroup>
+ <Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.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>
\ No newline at end of file
diff --git a/src/dev/impl/DevTools.Localization/LanguageManager.cs b/src/dev/impl/DevTools.Localization/LanguageManager.cs
new file mode 100644
index 000000000..bc4fccd5f
--- /dev/null
+++ b/src/dev/impl/DevTools.Localization/LanguageManager.cs
@@ -0,0 +1,81 @@
+
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using Microsoft.Toolkit.Mvvm.ComponentModel;
+using System.ComponentModel;
+using System.Globalization;
+using Windows.ApplicationModel.Resources;
+using Windows.Globalization;
+using Windows.UI.Xaml;
+
+namespace DevTools.Localization
+{
+ public partial class LanguageManager : ObservableObject
+ {
+ private static LanguageManager _languageManager;
+
+ private readonly MainPageStrings _mainpage = new MainPageStrings();
+
+ /// <summary>
+ /// Gets an instance of <see cref="LanguageManager"/>.
+ /// </summary>
+ public static LanguageManager Instance => _languageManager ?? (_languageManager = new LanguageManager());
+
+ /// <summary>
+ /// Gets if the text must be written from left to right or from right to left.
+ /// </summary>
+ public FlowDirection FlowDirection { get; private set; }
+
+ /// <summary>
+ /// Gets the <see cref="MainPageStrings"/>.
+ /// </summary>
+ public MainPageStrings MainPage => _mainpage;
+
+ /// <summary>
+ /// Retrieves the current culture.
+ /// </summary>
+ public CultureInfo GetCurrentCulture()
+ {
+ return CultureInfo.CurrentUICulture;
+ }
+
+ /// <summary>
+ /// Change the current culture of the application
+ /// </summary>
+ public void SetCurrentCulture(CultureInfo culture)
+ {
+ CultureInfo.DefaultThreadCurrentCulture = culture;
+ CultureInfo.DefaultThreadCurrentUICulture = culture;
+ ApplicationLanguages.PrimaryLanguageOverride = culture.TextInfo.CultureName;
+
+ if (culture.TextInfo.IsRightToLeft)
+ {
+ FlowDirection = FlowDirection.RightToLeft;
+ }
+ else
+ {
+ FlowDirection = FlowDirection.LeftToRight;
+ }
+
+ // All the properties changed.
+ OnPropertyChanged(new PropertyChangedEventArgs(string.Empty));
+ }
+ }
+
+ public class MainPageStrings : ObservableObject
+ {
+ private readonly ResourceLoader _resources = ResourceLoader.GetForViewIndependentUse("DevTools.Localization/MainPage");
+
+ /// <summary>
+ /// Gets the resource Yes.
+ /// </summary>
+ public string Yes => _resources.GetString("Yes");
+ }
+}
\ No newline at end of file
diff --git a/src/dev/impl/DevTools.Localization/LanguageManager.tt b/src/dev/impl/DevTools.Localization/LanguageManager.tt
new file mode 100644
index 000000000..289aa5f66
--- /dev/null
+++ b/src/dev/impl/DevTools.Localization/LanguageManager.tt
@@ -0,0 +1,178 @@
+<#@ template debug="true" hostSpecific="true" language="C#" #>
+<#@ output extension=".cs" #>
+<#@ Assembly Name="System.Core" #>
+<#@ Assembly Name="System.Windows.Forms" #>
+<#@ assembly name="System.Data" #>
+<#@ assembly name="System.Data.Entity" #>
+<#@ assembly name="System.Xml" #>
+<#@ assembly name="System.Xml.Linq"#>
+<#@ import namespace="System" #>
+<#@ import namespace="System.IO" #>
+<#@ import namespace="System.Text.RegularExpressions" #>
+<#@ import namespace="System.Diagnostics" #>
+<#@ import namespace="System.Linq" #>
+<#@ import namespace="System.Collections" #>
+<#@ import namespace="System.Collections.Generic" #>
+<#@ import namespace="System.ComponentModel.Design" #>
+<#@ import namespace="System.Resources" #>
+<#@ import namespace="Microsoft.CSharp"#>
+<#@ import namespace="System.Text"#>
+<#@ import namespace="Microsoft.VisualStudio.TextTemplating" #>
+
+<#
+ var stringsFolder = Host.ResolvePath(@"Strings/en");
+#>
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using Microsoft.Toolkit.Mvvm.ComponentModel;
+using System.ComponentModel;
+using System.Globalization;
+using Windows.ApplicationModel.Resources;
+using Windows.Globalization;
+using Windows.UI.Xaml;
+
+namespace DevTools.Localization
+{
+ public partial class LanguageManager : ObservableObject
+ {
+ private static LanguageManager _languageManager;
+
+<#
+ foreach (var file in Directory.GetFiles(stringsFolder, "*.resw"))
+ {
+ var fileInfo = new FileInfo(file);
+ var fileName = Path.GetFileNameWithoutExtension(fileInfo.Name);
+#>
+ private readonly <#= fileName #>Strings _<#= fileName.ToLower() #> = new <#= fileName #>Strings();
+<#
+ }
+#>
+
+ /// <summary>
+ /// Gets an instance of <see cref="LanguageManager"/>.
+ /// </summary>
+ public static LanguageManager Instance => _languageManager ?? (_languageManager = new LanguageManager());
+
+ /// <summary>
+ /// Gets if the text must be written from left to right or from right to left.
+ /// </summary>
+ public FlowDirection FlowDirection { get; private set; }
+<#
+ foreach (var file in Directory.GetFiles(stringsFolder, "*.resw"))
+ {
+ var fileInfo = new FileInfo(file);
+ var fileName = Path.GetFileNameWithoutExtension(fileInfo.Name);
+#>
+
+ /// <summary>
+ /// Gets the <see cref="<#= fileName #>Strings"/>.
+ /// </summary>
+ public <#= fileName #>Strings <#= fileName #> => _<#= fileName.ToLower() #>;
+<#
+ }
+#>
+
+ /// <summary>
+ /// Retrieves the current culture.
+ /// </summary>
+ public CultureInfo GetCurrentCulture()
+ {
+ return CultureInfo.CurrentUICulture;
+ }
+
+ /// <summary>
+ /// Change the current culture of the application
+ /// </summary>
+ public void SetCurrentCulture(CultureInfo culture)
+ {
+ CultureInfo.DefaultThreadCurrentCulture = culture;
+ CultureInfo.DefaultThreadCurrentUICulture = culture;
+ ApplicationLanguages.PrimaryLanguageOverride = culture.TextInfo.CultureName;
+
+ if (culture.TextInfo.IsRightToLeft)
+ {
+ FlowDirection = FlowDirection.RightToLeft;
+ }
+ else
+ {
+ FlowDirection = FlowDirection.LeftToRight;
+ }
+
+ // All the properties changed.
+ OnPropertyChanged(new PropertyChangedEventArgs(string.Empty));
+ }
+ }
+<#
+ // Generate strings classes.
+
+ foreach (var file in Directory.GetFiles(stringsFolder, "*.resw"))
+ {
+ var fileInfo = new FileInfo(file);
+ var fileName = Path.GetFileNameWithoutExtension(fileInfo.Name);
+ var resourcesFilePath = fileInfo.FullName;
+
+ if (!File.Exists(resourcesFilePath))
+ {
+ throw new FileNotFoundException(resourcesFilePath);
+ }
+
+ using (var reader = new ResXResourceReader(resourcesFilePath))
+ {
+ reader.UseResXDataNodes = true;
+#>
+
+ public class <#= $"{fileName}Strings" #> : ObservableObject
+ {
+ private readonly ResourceLoader _resources = ResourceLoader.GetForViewIndependentUse("DevTools.Localization/<#= fileName #>");
+<#
+ foreach (DictionaryEntry entry in reader)
+ {
+ var name = entry.Key;
+#>
+
+ /// <summary>
+ /// Gets the resource <#= name #>.
+ /// </summary>
+ public string <#= name #> => _resources.GetString("<#= $"{name}" #>");
+<#
+ var node = (ResXDataNode)entry.Value;
+ var value = node.GetValue((ITypeResolutionService) null).ToString();
+ if (value.Contains("{0}"))
+ {
+ var parametersCount = Regex.Matches(value.Replace("{{", string.Empty), @"\{(\d+)").OfType<Match>().Select(match => int.Parse(match.Groups[1].Value)).Union(Enumerable.Repeat(-1, 1)).Max() + 1;
+ var argumentsDecl = "";
+ var argumentsRef = "";
+ for (var i = 0; i < parametersCount; i++)
+ {
+ argumentsDecl += $"string param{i}, ";
+ argumentsRef += $"param{i}, ";
+ }
+
+ argumentsDecl = argumentsDecl.Trim(' ').Trim(',');
+ argumentsRef = argumentsRef.Trim(' ').Trim(',');
+ #>
+
+ /// <summary>
+ /// Gets the resource <#= name #> with format.
+ /// </summary>
+ public string GetFormatted<#= name #>(<#= argumentsDecl #>)
+ {
+ return string.Format(<#= name #>, <#= argumentsRef #>);
+ }
+<#
+ }
+ }
+#>
+ }
+<#
+ }
+ }
+#>
+}
\ No newline at end of file
diff --git a/src/dev/impl/DevTools.Localization/Properties/AssemblyInfo.cs b/src/dev/impl/DevTools.Localization/Properties/AssemblyInfo.cs
new file mode 100644
index 000000000..7a8b99071
--- /dev/null
+++ b/src/dev/impl/DevTools.Localization/Properties/AssemblyInfo.cs
@@ -0,0 +1,3 @@
+using System.Reflection;
+
+[assembly: AssemblyTitle("DevTools.Localization")]
\ No newline at end of file
diff --git a/src/dev/impl/DevTools.Localization/Strings/en/MainPage.resw b/src/dev/impl/DevTools.Localization/Strings/en/MainPage.resw
new file mode 100644
index 000000000..89e45ecec
--- /dev/null
+++ b/src/dev/impl/DevTools.Localization/Strings/en/MainPage.resw
@@ -0,0 +1,123 @@
+<?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.Runtime.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:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <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" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </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" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </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=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <data name="Yes" xml:space="preserve">
+ <value>Yes</value>
+ </data>
+</root>
\ No newline at end of file
diff --git a/src/dev/impl/DevTools.Providers.Impl/DevTools.Providers.Impl.csproj b/src/dev/impl/DevTools.Providers.Impl/DevTools.Providers.Impl.csproj
new file mode 100644
index 000000000..bd0b2ac94
--- /dev/null
+++ b/src/dev/impl/DevTools.Providers.Impl/DevTools.Providers.Impl.csproj
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="15.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>
+ <ProjectGuid>{8621ED11-E9DD-480A-BE2B-C1DB00919B6F}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>DevTools.Providers.Impl</RootNamespace>
+ <AssemblyName>DevTools.Providers.Impl</AssemblyName>
+ <DefaultLanguage>en-US</DefaultLanguage>
+ <TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
+ <TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">$(Windows10SDKVersion)</TargetPlatformVersion>
+ <TargetPlatformMinVersion>$(Windows10MinSDKVersion)</TargetPlatformMinVersion>
+ <MinimumVisualStudioVersion>16</MinimumVisualStudioVersion>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
+ <DebugSymbols>true</DebugSymbols>
+ <DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
+ <DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM'">
+ <DebugSymbols>true</DebugSymbols>
+ <DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>ARM</PlatformTarget>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM'">
+ <DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>ARM</PlatformTarget>
+ <UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM64'">
+ <DebugSymbols>true</DebugSymbols>
+ <DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>ARM64</PlatformTarget>
+ <UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM64'">
+ <DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>ARM64</PlatformTarget>
+ <UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
+ <DebugSymbols>true</DebugSymbols>
+ <DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
+ <DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="..\..\shared\SharedAssemblyInfo.cs">
+ <Link>Properties\SharedAssemblyInfo.cs</Link>
+ </Compile>
+ <Compile Include="Dummy.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform" Version="$(NuGet_MicrosoftNETCoreUniversalWindowsPlatform)" />
+ <PackageReference Include="Microsoft.Toolkit.Mvvm" Version="$(NuGet_MicrosoftToolkitMvvm)" />
+ <PackageReference Include="Microsoft.UI.Xaml" Version="$(NuGet_MicrosoftUIXaml)" />
+ <PackageReference Include="System.Composition" Version="$(NuGet_SystemComposition)" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\def\DevTools.Providers\DevTools.Providers.csproj">
+ <Project>{ada9988b-e19b-4ee5-9162-dab3b12bcf9e}</Project>
+ <Name>DevTools.Providers</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\DevTools.Localization\DevTools.Localization.csproj">
+ <Project>{935d5df8-c400-4ca6-aabe-34a06a69af85}</Project>
+ <Name>DevTools.Localization</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.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>
\ No newline at end of file
diff --git a/src/dev/impl/DevTools.Providers.Impl/Dummy.cs b/src/dev/impl/DevTools.Providers.Impl/Dummy.cs
new file mode 100644
index 000000000..38eb877f0
--- /dev/null
+++ b/src/dev/impl/DevTools.Providers.Impl/Dummy.cs
@@ -0,0 +1,6 @@
+namespace DevTools.Providers.Impl
+{
+ public class Dummy
+ {
+ }
+}
diff --git a/src/dev/impl/DevTools.Providers.Impl/Properties/AssemblyInfo.cs b/src/dev/impl/DevTools.Providers.Impl/Properties/AssemblyInfo.cs
new file mode 100644
index 000000000..cbc480c8e
--- /dev/null
+++ b/src/dev/impl/DevTools.Providers.Impl/Properties/AssemblyInfo.cs
@@ -0,0 +1,3 @@
+using System.Reflection;
+
+[assembly: AssemblyTitle("DevTools.Providers.Impl")]
\ No newline at end of file
diff --git a/src/dev/startup/DevTools.Startup/DevTools.Startup.wapproj b/src/dev/startup/DevTools.Startup/DevTools.Startup.wapproj
index a96026297..d9c426031 100644
--- a/src/dev/startup/DevTools.Startup/DevTools.Startup.wapproj
+++ b/src/dev/startup/DevTools.Startup/DevTools.Startup.wapproj
@@ -42,12 +42,12 @@
<ProjectGuid>361db7bc-be7b-41a2-a29a-978a9e3b4aa7</ProjectGuid>
<TargetPlatformVersion>$(Windows10SDKVersion)</TargetPlatformVersion>
<TargetPlatformMinVersion>$(Windows10MinSDKVersion)</TargetPlatformMinVersion>
- <DefaultLanguage>en-US</DefaultLanguage>
+ <DefaultLanguage>en</DefaultLanguage>
<AppxPackageSigningEnabled>false</AppxPackageSigningEnabled>
<GenerateAppInstallerFile>False</GenerateAppInstallerFile>
<AppxAutoIncrementPackageRevision>False</AppxAutoIncrementPackageRevision>
<GenerateTestArtifacts>True</GenerateTestArtifacts>
- <AppxBundlePlatforms>x86|x64</AppxBundlePlatforms>
+ <AppxBundlePlatforms>x86|x64|arm|arm64</AppxBundlePlatforms>
<HoursBetweenUpdateChecks>0</HoursBetweenUpdateChecks>
<AppxPackageDir>..\..\..\..\bin\AppPackages\</AppxPackageDir>
<AppxBundle>Always</AppxBundle>
@@ -72,6 +72,6 @@
</ItemGroup>
<Import Project="$(WapProjPath)\Microsoft.DesktopBridge.targets" />
<ItemGroup>
- <PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.19041.8" PrivateAssets="all" />
+ <PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="$(NuGet_MicrosoftWindowsSDKBuildTools)" PrivateAssets="all" />
</ItemGroup>
</Project>
\ No newline at end of file
diff --git a/src/dev/startup/DevTools.Uwp/App.xaml b/src/dev/startup/DevTools.Uwp/App.xaml
index 2e47563df..b54a3c658 100644
--- a/src/dev/startup/DevTools.Uwp/App.xaml
+++ b/src/dev/startup/DevTools.Uwp/App.xaml
@@ -2,6 +2,12 @@
x:Class="DevTools.Uwp.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:local="using:DevTools.Uwp">
-
+ xmlns:controls="using:Microsoft.UI.Xaml.Controls">
+ <Application.Resources>
+ <controls:XamlControlsResources>
+ <controls:XamlControlsResources.MergedDictionaries>
+ <!-- Other app resources here -->
+ </controls:XamlControlsResources.MergedDictionaries>
+ </controls:XamlControlsResources>
+ </Application.Resources>
</Application>
diff --git a/src/dev/startup/DevTools.Uwp/App.xaml.cs b/src/dev/startup/DevTools.Uwp/App.xaml.cs
index 006523719..166ce0c96 100644
--- a/src/dev/startup/DevTools.Uwp/App.xaml.cs
+++ b/src/dev/startup/DevTools.Uwp/App.xaml.cs
@@ -1,4 +1,9 @@
-using System;
+#nullable enable
+
+using DevTools.Core.Impl.Injection;
+using DevTools.Localization;
+using System;
+using System.Globalization;
using Windows.ApplicationModel;
using Windows.ApplicationModel.Activation;
using Windows.UI.Xaml;
@@ -10,18 +15,57 @@ namespace DevTools.Uwp
/// <summary>
/// Provides application-specific behavior to supplement the default Application class.
/// </summary>
- sealed partial class App : Application
+ sealed partial class App : Application, IDisposable
{
+ private readonly MefComposer _mefComposer;
+
+ private bool _isDisposed;
+
/// <summary>
/// Initializes the singleton application object. This is the first line of authored code
/// executed, and as such is the logical equivalent of main() or WinMain().
/// </summary>
public App()
{
+ // Set the language of the app.
+ LanguageManager.Instance.SetCurrentCulture(CultureInfo.InstalledUICulture);
+
+ // Initialize MEF
+ _mefComposer
+ = new MefComposer(
+ typeof(MefComposer).Assembly,
+ typeof(Providers.Impl.Dummy).Assembly);
+
this.InitializeComponent();
this.Suspending += OnSuspending;
}
+ ~App()
+ {
+ Dispose(false);
+ }
+
+ public void Dispose()
+ {
+ Dispose(true);
+ GC.SuppressFinalize(this);
+ }
+
+ private void Dispose(bool disposing)
+ {
+ if (_isDisposed)
+ {
+ return;
+ }
+
+ if (disposing)
+ {
+ _mefComposer?.Dispose();
+ }
+
+ _isDisposed = true;
+ }
+
/// <summary>
/// Invoked when the application is launched normally by the end user. Other entry points
/// will be used such as when the application is launched to open a specific file.
@@ -29,11 +73,9 @@ namespace DevTools.Uwp
/// <param name="e">Details about the launch request and process.</param>
protected override void OnLaunched(LaunchActivatedEventArgs e)
{
- Frame rootFrame = Window.Current.Content as Frame;
-
// Do not repeat app initialization when the Window already has content,
// just ensure that the window is active
- if (rootFrame == null)
+ if (Window.Current.Content is not Frame rootFrame)
{
// Create a Frame to act as the navigation context and navigate to the first page
rootFrame = new Frame();
diff --git a/src/dev/startup/DevTools.Uwp/DevTools.Uwp.csproj b/src/dev/startup/DevTools.Uwp/DevTools.Uwp.csproj
index 683381083..fb48a5e5d 100644
--- a/src/dev/startup/DevTools.Uwp/DevTools.Uwp.csproj
+++ b/src/dev/startup/DevTools.Uwp/DevTools.Uwp.csproj
@@ -7,7 +7,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>DevTools.Uwp</RootNamespace>
<AssemblyName>DevTools.Uwp</AssemblyName>
- <DefaultLanguage>en-US</DefaultLanguage>
+ <DefaultLanguage>en</DefaultLanguage>
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">$(Windows10SDKVersion)</TargetPlatformVersion>
<TargetPlatformMinVersion>$(Windows10MinSDKVersion)</TargetPlatformMinVersion>
@@ -70,20 +70,17 @@
<PlatformTarget>x64</PlatformTarget>
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
</PropertyGroup>
- <PropertyGroup>
- <RestoreProjectStyle>PackageReference</RestoreProjectStyle>
- </PropertyGroup>
<ItemGroup>
<Compile Include="..\..\shared\SharedAssemblyInfo.cs">
<Link>Properties\SharedAssemblyInfo.cs</Link>
</Compile>
+ <Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="App.xaml.cs">
<DependentUpon>App.xaml</DependentUpon>
</Compile>
<Compile Include="MainPage.xaml.cs">
<DependentUpon>MainPage.xaml</DependentUpon>
</Compile>
- <Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<AppxManifest Include="Package.appxmanifest">
@@ -125,13 +122,31 @@
</Page>
</ItemGroup>
<ItemGroup>
- <PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
- <Version>6.2.12</Version>
- </PackageReference>
+ <PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform" Version="$(NuGet_MicrosoftNETCoreUniversalWindowsPlatform)" />
+ <PackageReference Include="Microsoft.UI.Xaml" Version="$(NuGet_MicrosoftUIXaml)" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\def\DevTools.Core\DevTools.Core.csproj">
+ <Project>{ef6a6707-44f2-4e76-98b8-11c9b40adc7e}</Project>
+ <Name>DevTools.Core</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\def\DevTools.Providers\DevTools.Providers.csproj">
+ <Project>{ada9988b-e19b-4ee5-9162-dab3b12bcf9e}</Project>
+ <Name>DevTools.Providers</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\impl\DevTools.Core.Impl\DevTools.Core.Impl.csproj">
+ <Project>{98274c08-4636-45ee-95af-2c069bfbabd4}</Project>
+ <Name>DevTools.Core.Impl</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\impl\DevTools.Localization\DevTools.Localization.csproj">
+ <Project>{935D5DF8-C400-4CA6-AABE-34A06A69AF85}</Project>
+ <Name>DevTools.Localization</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\impl\DevTools.Providers.Impl\DevTools.Providers.Impl.csproj">
+ <Project>{8621ed11-e9dd-480a-be2b-c1db00919b6f}</Project>
+ <Name>DevTools.Providers.Impl</Name>
+ </ProjectReference>
</ItemGroup>
- <PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' ">
- <VisualStudioVersion>14.0</VisualStudioVersion>
- </PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.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.
diff --git a/src/dev/startup/DevTools.Uwp/MainPage.xaml b/src/dev/startup/DevTools.Uwp/MainPage.xaml
index 715b765d6..09b25a854 100644
--- a/src/dev/startup/DevTools.Uwp/MainPage.xaml
+++ b/src/dev/startup/DevTools.Uwp/MainPage.xaml
@@ -5,10 +5,24 @@
xmlns:local="using:DevTools.Uwp"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
mc:Ignorable="d"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Grid>
-
+ <ScrollViewer Padding="16" Height="300">
+ <StackPanel Orientation="Vertical" HorizontalAlignment="Left">
+ <TextBox PlaceholderText="TextBox" Width="200" />
+ <Button Content="Standard XAML button" />
+ <CheckBox Content="Two-state CheckBox"/>
+ <CheckBox Content="Two-state CheckBox" IsChecked="True"/>
+ <Slider Width="200"/>
+ <muxc:RadioButtons>
+ <x:String>One</x:String>
+ <x:String>Two</x:String>
+ <x:String>Three</x:String>
+ </muxc:RadioButtons>
+ </StackPanel>
+ </ScrollViewer>
</Grid>
</Page>