Skip to content

Commit b861b3a

Browse files
authored
Adding namespace (#1131)
* Adding namespace * Adding Microsoft.Windows.System namespace to build files. * Adding Microsoft.Windows.System to the correct places. * Adding intellisense file. * Adding IDL * Adding IDL * Adding a refrence * Adding intellisense Co-authored-by: Darren Hoehna <[email protected]>
1 parent 38bd433 commit b861b3a

13 files changed

Lines changed: 182 additions & 18 deletions

WindowsAppSDK.sln

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,17 +173,23 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PowerNotifications", "test\
173173
EndProject
174174
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WindowsAppSDK.Test.Singleton.Msix", "test\DynamicDependency\data\WindowsAppSDK.Test.Singleton.Msix\WindowsAppSDK.Test.Singleton.Msix.vcxproj", "{8F2C21F1-47AB-428C-A110-EE33FD7D9493}"
175175
EndProject
176+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Microsoft.Process.Environment", "Microsoft.Process.Environment", "{92801D0D-B76F-4EAA-914F-31F54241536F}"
177+
EndProject
178+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Microsoft.Process.Environment", "dev\Microsoft.Process.Environment\Microsoft.Process.Environment.vcxitems", "{2F3FAD1B-D3DF-4866-A3A3-C2C777D55638}"
179+
EndProject
176180
Global
177181
GlobalSection(SharedMSBuildProjectFiles) = preSolution
178182
test\inc\inc.vcxitems*{0a5fee93-48b7-40ec-bb9a-b27d11060da9}*SharedItemsImports = 4
179183
dev\PushNotifications\PushNotifications.vcxitems*{103c0c23-7ba8-4d44-a63c-83488e2e3a81}*SharedItemsImports = 9
184+
dev\Microsoft.Process.Environment\Microsoft.Process.Environment.vcxitems*{2f3fad1b-d3df-4866-a3a3-c2c777d55638}*SharedItemsImports = 9
180185
dev\UndockedRegFreeWinRT\UndockedRegFreeWinRT.vcxitems*{56371ca6-144b-4989-a4e9-391ad4fa7651}*SharedItemsImports = 9
181186
test\inc\inc.vcxitems*{56a1d696-feda-4333-bf37-772ebececb10}*SharedItemsImports = 4
182187
test\inc\inc.vcxitems*{7c502995-59c3-483b-86ba-815985353633}*SharedItemsImports = 4
183188
test\inc\inc.vcxitems*{8e52d7ea-a200-4a6b-ba74-8efb49468caf}*SharedItemsImports = 4
184189
test\inc\inc.vcxitems*{b567fe2e-3a03-48d0-b2b5-760cdec35891}*SharedItemsImports = 9
185190
dev\Common\Common.vcxitems*{b73ad907-6164-4294-88fb-f3c9c10da1f1}*SharedItemsImports = 4
186191
dev\DynamicDependency\DynamicDependency.vcxitems*{b73ad907-6164-4294-88fb-f3c9c10da1f1}*SharedItemsImports = 4
192+
dev\Microsoft.Process.Environment\Microsoft.Process.Environment.vcxitems*{b73ad907-6164-4294-88fb-f3c9c10da1f1}*SharedItemsImports = 4
187193
dev\PowerNotifications\PowerNotifications.vcxitems*{b73ad907-6164-4294-88fb-f3c9c10da1f1}*SharedItemsImports = 4
188194
dev\UndockedRegFreeWinRT\UndockedRegFreeWinRT.vcxitems*{b73ad907-6164-4294-88fb-f3c9c10da1f1}*SharedItemsImports = 4
189195
dev\PowerNotifications\PowerNotifications.vcxitems*{b75c1b22-553c-40e4-b38e-6ab4d01fdb9d}*SharedItemsImports = 9
@@ -674,6 +680,8 @@ Global
674680
{B75C1B22-553C-40E4-B38E-6AB4D01FDB9D} = {E9117D76-63AC-4289-A628-AB39EF6E5D19}
675681
{CBD95746-61CE-4F31-B6CC-C5ABF1766180} = {8630F7AA-2969-4DC9-8700-9B468C1DC21D}
676682
{8F2C21F1-47AB-428C-A110-EE33FD7D9493} = {0C534F12-B076-47E5-A05B-2A711233AC6F}
683+
{92801D0D-B76F-4EAA-914F-31F54241536F} = {448ED2E5-0B37-4D97-9E6B-8C10A507976A}
684+
{2F3FAD1B-D3DF-4866-A3A3-C2C777D55638} = {92801D0D-B76F-4EAA-914F-31F54241536F}
677685
EndGlobalSection
678686
GlobalSection(ExtensibilityGlobals) = postSolution
679687
SolutionGuid = {4B3D7591-CFEC-4762-9A07-ABE99938FB77}

build/AzurePipelinesTemplates/WindowsAppSDK-CreateNugetPackage-Job.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ jobs:
7272
7373
Copy-Item -Path "$targetsFilePath\Intellisense\Microsoft.Windows.AppLifecycle.xml" -Destination "$fullpackagePath\lib\uap10.0\Microsoft.Windows.AppLifecycle.xml"
7474
Copy-Item -Path "$targetsFilePath\Intellisense\Microsoft.Windows.ApplicationModel.DynamicDependency.xml" -Destination "$fullpackagePath\lib\uap10.0\Microsoft.Windows.ApplicationModel.DynamicDependency.xml"
75+
Copy-Item -Path "$targetsFilePath\Intellisense\Microsoft.Windows.System.xml" -Destination "$fullpackagePath\lib\uap10.0\Microsoft.Windows.System.xml"
7576
Copy-Item -Path "$targetsFilePath\Intellisense\Microsoft.Windows.PushNotifications.xml" -Destination "$fullpackagePath\lib\uap10.0\Microsoft.Windows.PushNotifications.xml"
7677
7778
# - script: |

build/CopyFilesToStagingDir.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ PublishFile $FullBuildOutput\WindowsAppSDK_DLL\Microsoft.WindowsAppSDK.lib $Full
4040
PublishFile $FullBuildOutput\WindowsAppSDK_DLL\Microsoft.Windows.AppLifecycle.winmd $FullPublishDir\Microsoft.WindowsAppSDK\
4141
PublishFile $FullBuildOutput\WindowsAppSDK_DLL\Microsoft.Windows.PushNotifications.winmd $FullPublishDir\Microsoft.WindowsAppSDK\
4242
PublishFile $FullBuildOutput\WindowsAppSDK_DLL\Microsoft.Windows.ApplicationModel.DynamicDependency.winmd $FullPublishDir\Microsoft.WindowsAppSDK\
43+
PublishFile $FullBuildOutput\WindowsAppSDK_DLL\Microsoft.Windows.System.winmd $FullPublishDir\Microsoft.WindowsAppSDK\
4344
PublishFile $FullBuildOutput\WindowsAppSDK_DLL\MsixDynamicDependency.h $FullPublishDir\Microsoft.WindowsAppSDK\
4445
PublishFile $FullBuildOutput\WindowsAppSDK_DLL\wil_msixdynamicdependency.h $FullPublishDir\Microsoft.WindowsAppSDK\
4546
#

build/NuSpecs/AppxManifest.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@
3333
<ActivatableClass ActivatableClassId="Microsoft.Windows.ApplicationModel.DynamicDependency.PackageDependency" ThreadingModel="both" />
3434
<ActivatableClass ActivatableClassId="Microsoft.Windows.ApplicationModel.DynamicDependency.PackageDependencyContext" ThreadingModel="both" />
3535
<ActivatableClass ActivatableClassId="Microsoft.Windows.ApplicationModel.DynamicDependency.PackageDependencyRank" ThreadingModel="both" />
36+
37+
<!-- Environment Manager -->
38+
<ActivatableClass ActivatableClassId="Microsoft.Windows.System.EnvironmentManager" ThreadingModel="both" />
3639

3740
<!-- AppLifecycle -->
3841
<ActivatableClass ActivatableClassId="Microsoft.Windows.AppLifecycle.ActivationRegistrationManager" ThreadingModel="both" />

build/NuSpecs/Intellisense/Microsoft.Windows.System.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/NuSpecs/WindowsAppSDK-Nuget-Native.WinRt.props

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@
2020
<Implementation Condition="'$(WindowsAppSDKFrameworkPackage)' != 'true'">$(MSBuildThisFileDirectory)..\..\runtimes\win10-$(_WindowsAppSDKFoundationPlatform)\native\Microsoft.WindowsAppSDK.dll</Implementation>
2121
<IsWinMDFile>true</IsWinMDFile>
2222
</Reference>
23+
<Reference Include="Microsoft.Windows.System.winmd">
24+
<HintPath>$(MSBuildThisFileDirectory)..\..\lib\native\Microsoft.Windows.System.winmd</HintPath>
25+
<Implementation Condition="'$(WindowsAppSDKFrameworkPackage)' != 'true'">$(MSBuildThisFileDirectory)..\..\runtimes\win10-$(_WindowsAppSDKFoundationPlatform)\native\Microsoft.WindowsAppSDK.dll</Implementation>
26+
<IsWinMDFile>true</IsWinMDFile>
27+
</Reference>
2328
<Reference Include="Microsoft.Windows.PushNotifications.winmd">
2429
<HintPath>$(MSBuildThisFileDirectory)..\..\lib\uap10.0\Microsoft.Windows.PushNotifications.winmd</HintPath>
2530
<Implementation Condition="'$(WindowsAppSDKFrameworkPackage)' != 'true'">$(MSBuildThisFileDirectory)..\..\runtimes\win10-$(_WindowsAppSDKFoundationPlatform)\native\Microsoft.WindowsAppSDK.dll</Implementation>

build/NuSpecs/WindowsAppSDK-Nuget-Native.targets

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@
2222
<Implementation>Microsoft.WindowsAppSDK.dll</Implementation>
2323
</Reference>
2424
</ItemGroup>
25+
26+
<ItemGroup>
27+
<Reference Include="$(MSBuildThisFileDirectory)..\..\lib\native\Microsoft.Windows.System.winmd">
28+
<Private>false</Private>
29+
<Implementation>Microsoft.WindowsAppSDK.dll</Implementation>
30+
</Reference>
31+
</ItemGroup>
2532

2633
<ItemGroup>
2734
<Reference Include="$(MSBuildThisFileDirectory)..\..\lib\native\Microsoft.Windows.PushNotifications.winmd">
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License. See LICENSE in the project root for license information.
3+
4+
namespace Microsoft.Windows.System
5+
{
6+
runtimeclass EnvironmentManager
7+
{
8+
static EnvironmentManager GetForProcess();
9+
static EnvironmentManager GetForUser();
10+
static EnvironmentManager GetForMachine();
11+
12+
static Boolean IsSupported{ get; };
13+
14+
IMapView<String, String> GetEnvironmentVariables();
15+
String GetEnvironmentVariable(String name);
16+
void SetEnvironmentVariable(String name, String value);
17+
18+
// Path manipulation
19+
void AppendToPath(String path);
20+
void RemoveFromPath(String path);
21+
22+
// PathExt Manipulation
23+
void AddExecutableFileExtension(String pathExt);
24+
void RemoveExecutableFileExtension(String pathExt);
25+
}
26+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup Label="Globals">
4+
<MSBuildAllProjects Condition="'$(MSBuildVersion)' == '' Or '$(MSBuildVersion)' &lt; '16.0'">$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
5+
<HasSharedItems>true</HasSharedItems>
6+
<ItemsProjectGuid>{2f3fad1b-d3df-4866-a3a3-c2c777d55638}</ItemsProjectGuid>
7+
</PropertyGroup>
8+
<ItemDefinitionGroup>
9+
<ClCompile>
10+
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(MSBuildThisFileDirectory)</AdditionalIncludeDirectories>
11+
</ClCompile>
12+
</ItemDefinitionGroup>
13+
<ItemGroup>
14+
<ProjectCapability Include="SourceItemsFromImports" />
15+
</ItemGroup>
16+
<ItemGroup>
17+
<Midl Include="$(MSBuildThisFileDirectory)EnvironmentManager.idl" />
18+
</ItemGroup>
19+
<ItemGroup>
20+
<ClCompile Include="$(MSBuildThisFileDirectory)Microsoft.Windows.System.EnvironmentManager.cpp" />
21+
</ItemGroup>
22+
<ItemGroup>
23+
<ClInclude Include="$(MSBuildThisFileDirectory)Microsoft.Windows.System.EnvironmentManager.h" />
24+
</ItemGroup>
25+
</Project>
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
#include "pch.h"
2+
#include "Microsoft.Windows.System.EnvironmentManager.h"
3+
#include "Microsoft.Windows.System.EnvironmentManager.g.cpp"
4+
5+
namespace winrt::Microsoft::Windows::System::implementation
6+
{
7+
winrt::Microsoft::Windows::System::EnvironmentManager EnvironmentManager::GetForProcess()
8+
{
9+
throw hresult_not_implemented();
10+
}
11+
winrt::Microsoft::Windows::System::EnvironmentManager EnvironmentManager::GetForUser()
12+
{
13+
throw hresult_not_implemented();
14+
}
15+
winrt::Microsoft::Windows::System::EnvironmentManager EnvironmentManager::GetForMachine()
16+
{
17+
throw hresult_not_implemented();
18+
}
19+
bool EnvironmentManager::IsSupported()
20+
{
21+
throw hresult_not_implemented();
22+
}
23+
winrt::Windows::Foundation::Collections::IMapView<hstring, hstring> EnvironmentManager::GetEnvironmentVariables()
24+
{
25+
throw hresult_not_implemented();
26+
}
27+
hstring EnvironmentManager::GetEnvironmentVariable(hstring const& name)
28+
{
29+
throw hresult_not_implemented();
30+
}
31+
void EnvironmentManager::SetEnvironmentVariable(hstring const& name, hstring const& value)
32+
{
33+
throw hresult_not_implemented();
34+
}
35+
void EnvironmentManager::AppendToPath(hstring const& path)
36+
{
37+
throw hresult_not_implemented();
38+
}
39+
void EnvironmentManager::RemoveFromPath(hstring const& path)
40+
{
41+
throw hresult_not_implemented();
42+
}
43+
void EnvironmentManager::AddExecutableFileExtension(hstring const& pathExt)
44+
{
45+
throw hresult_not_implemented();
46+
}
47+
void EnvironmentManager::RemoveExecutableFileExtension(hstring const& pathExt)
48+
{
49+
throw hresult_not_implemented();
50+
}
51+
}

0 commit comments

Comments
 (0)