Skip to content

Commit 5b305d9

Browse files
authored
Merge branch 'main' into rangeselector-continuous
2 parents 3c8eafb + 09eb161 commit 5b305d9

File tree

107 files changed

+1775
-870
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+1775
-870
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
<!-- 🚨 Please Do Not skip any instructions and information mentioned below as they are all required and essential to evaluate and test the PR. By fulfilling all the required information you will be able to reduce the volume of questions and most likely help merge the PR faster 🚨 -->
22

3-
<!-- 📝 It is preferred if you keep the "☑️ Allow edits by maintainers" checked in the Pull Request Template as it increases collaboration with the Toolkit maintainers by permitting commits to your PR branch (only) created from your fork. This can let us quickly make fixes for minor typos or forgotten StyleCop issues during review without needing to wait on you doing extra work. Let us help you help us! 🎉 -->
3+
<!-- 👉 It is imperative to resolve ONE ISSUE PER PR and avoid making multiple changes unless the changes interrelate with each other -->
4+
5+
<!-- 📝 Please always keep the "☑️ Allow edits by maintainers" button checked in the Pull Request Template as it increases collaboration with the Toolkit maintainers by permitting commits to your PR branch (only) created from your fork. This can let us quickly make fixes for minor typos or forgotten StyleCop issues during review without needing to wait on you doing extra work. Let us help you help us! 🎉 -->
46

57

68
## Fixes #
7-
<!-- Add the relevant issue number after the "#" mentioned above (for ex: Fixes #1234) which will automatically close the issue once the PR is merged. -->
9+
<!-- Add the relevant issue number after the "#" mentioned above (for ex: "## Fixes #1234") which will automatically close the issue once the PR is merged. -->
810

911
<!-- Add a brief overview here of the feature/bug & fix. -->
1012

1113
## PR Type
1214
What kind of change does this PR introduce?
13-
<!-- Please uncomment one or more that apply to this PR. -->
15+
<!-- Please uncomment one or more options below that apply to this PR. -->
1416

1517
<!-- - Bugfix -->
1618
<!-- - Feature -->
File renamed without changes.

Directory.Build.props

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@
3131
<GenerateDocumentationFile>true</GenerateDocumentationFile>
3232
</PropertyGroup>
3333
</When>
34+
<Otherwise>
35+
<PropertyGroup>
36+
<IsPackable>false</IsPackable>
37+
</PropertyGroup>
38+
</Otherwise>
3439
</Choose>
3540

3641
<Choose>
@@ -45,33 +50,33 @@
4550
<When Condition="'$(Configuration)' == 'Debug' and '$(IsDesignProject)' != 'true'">
4651
<!-- Debug builds have this turned on by default, but it breaks our Xaml Islands Scenarios -->
4752
<PropertyGroup>
48-
<EnableTypeInfoReflection>false</EnableTypeInfoReflection>
4953
<EnableXBindDiagnostics>false</EnableXBindDiagnostics>
54+
<EnableTypeInfoReflection>false</EnableTypeInfoReflection>
5055
</PropertyGroup>
5156
</When>
5257
</Choose>
5358

5459
<Choose>
5560
<When Condition="'$(SourceLinkEnabled)' != 'false' and '$(IsSampleProject)' != 'true'">
5661
<PropertyGroup>
57-
<!-- Optional: Declare that the Repository URL can be published to NuSpec -->
62+
<!-- Declare that the Repository URL can be published to NuSpec -->
5863
<PublishRepositoryUrl>true</PublishRepositoryUrl>
59-
<!-- Optional: Embed source files that are not tracked by the source control manager to the PDB -->
64+
<!-- Embed source files that are not tracked by the source control manager to the PDB -->
6065
<EmbedUntrackedSources>true</EmbedUntrackedSources>
61-
<!-- Optional: Include PDB in the built .nupkg -->
66+
<!-- Include PDB in the built .nupkg -->
6267
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
6368
</PropertyGroup>
6469
<ItemGroup>
65-
<PackageReference Include="Microsoft.SourceLink.AzureRepos.Git" Version="1.0.0" PrivateAssets="All"/>
66-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All"/>
70+
<PackageReference Include="Microsoft.SourceLink.AzureRepos.Git" Version="1.0.0" PrivateAssets="All" />
71+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
6772
</ItemGroup>
6873
</When>
6974
</Choose>
7075

7176
<Choose>
7277
<When Condition="'$(IsDesignProject)' != 'true'">
7378
<ItemGroup>
74-
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="all" IncludeAssets="runtime; build; native; contentfiles; analyzers; buildtransitive"/>
79+
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="all" IncludeAssets="runtime; build; native; contentfiles; analyzers; buildtransitive" />
7580
</ItemGroup>
7681
</When>
7782
</Choose>
@@ -103,10 +108,10 @@
103108
<AdditionalFiles Include="$(MSBuildThisFileDirectory)stylecop.json">
104109
<Link>stylecop.json</Link>
105110
</AdditionalFiles>
106-
<None Include="$(MSBuildThisFileDirectory)license.md" Pack="true" PackagePath="\"/>
107-
<None Include="$(MSBuildThisFileDirectory)build\nuget.png" Pack="true" PackagePath="images\"/>
111+
<None Include="$(MSBuildThisFileDirectory)License.md" Pack="true" PackagePath="\" />
112+
<None Include="$(MSBuildThisFileDirectory)build\nuget.png" Pack="true" PackagePath="images\" />
108113
</ItemGroup>
109114

110-
<Import Project="$(MSBuildThisFileDirectory)build\Windows.Toolkit.VisualStudio.Design.props" Condition="'$(IsDesignProject)' == 'true'"/>
115+
<Import Project="$(MSBuildThisFileDirectory)build\Windows.Toolkit.VisualStudio.Design.props" Condition="'$(IsDesignProject)' == 'true'" />
111116

112117
</Project>

Directory.Build.targets

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
</PropertyGroup>
66

77
<Choose>
8-
<!--We'll include signing the Notifications library since we need the DLL signature to match for interop from class libraries to main projects-->
8+
<!-- We'll include signing the Notifications library since we need the DLL signature to match for interop from class libraries to main projects -->
99
<When Condition="(!$(TargetFramework.Contains(`uap10.0`)) and '$(TargetFramework)' != 'native' and '$(IsSampleProject)' != 'true') or $(MSBuildProjectName) == 'Microsoft.Toolkit.Uwp.Notifications'">
1010
<PropertyGroup>
1111
<SignAssembly>true</SignAssembly>
@@ -15,11 +15,11 @@
1515
</Choose>
1616

1717
<!--Exclude Notifications project from this since it sets different min versions than what we want for notifications-->
18-
<Import Project="$(MSBuildThisFileDirectory)build\Windows.Toolkit.Uwp.Build.targets" Condition="'$(UseUWP)' == 'true' and $(MSBuildProjectName) != 'Microsoft.Toolkit.Uwp.Notifications'"/>
18+
<Import Project="$(MSBuildThisFileDirectory)build\Windows.Toolkit.Uwp.Build.targets" Condition="'$(UseUWP)' == 'true' and $(MSBuildProjectName) != 'Microsoft.Toolkit.Uwp.Notifications'" />
1919

2020
<Target Name="AddCommitHashToAssemblyAttributes" BeforeTargets="GetAssemblyAttributes">
2121
<ItemGroup>
22-
<AssemblyAttribute Include="System.Reflection.AssemblyMetadataAttribute" Condition=" '$(SourceRevisionId)' != '' ">
22+
<AssemblyAttribute Include="System.Reflection.AssemblyMetadataAttribute" Condition="'$(SourceRevisionId)' != ''">
2323
<_Parameter1>CommitHash</_Parameter1>
2424
<_Parameter2>$(SourceRevisionId)</_Parameter2>
2525
</AssemblyAttribute>

GazeInputTest/GazeInputTest.csproj

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,6 @@
151151
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
152152
<Version>6.2.12</Version>
153153
</PackageReference>
154-
<PackageReference Include="StyleCop.Analyzers">
155-
<Version>1.0.2</Version>
156-
</PackageReference>
157154
</ItemGroup>
158155
<ItemGroup>
159156
<ProjectReference Include="..\Microsoft.Toolkit.Uwp.Input.GazeInteraction\Microsoft.Toolkit.Uwp.Input.GazeInteraction.csproj">
@@ -165,11 +162,6 @@
165162
<VisualStudioVersion>14.0</VisualStudioVersion>
166163
</PropertyGroup>
167164
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
168-
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
169-
Other similar extension points exist, see Microsoft.Common.targets.
170-
<Target Name="BeforeBuild">
171-
</Target>
172-
<Target Name="AfterBuild">
173-
</Target>
174-
-->
165+
<!-- No-op to avoid build error when packing solution from commandline -->
166+
<Target Name="Pack" />
175167
</Project>

GazeInputTest/Properties/Default.rd.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,13 @@
1414
Using the Namespace directive to apply reflection policy to all the types in a particular namespace
1515
<Namespace Name="DataClasses.ViewModels" Serialize="All" />
1616
-->
17-
1817
<Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata">
1918
<Application>
2019
<!--
2120
An Assembly element with Name="*Application*" applies to all assemblies in
2221
the application package. The asterisks are not wildcards.
2322
-->
2423
<Assembly Name="*Application*" Dynamic="Required All" />
25-
26-
2724
<!-- Add your application specific runtime directives here. -->
28-
29-
3025
</Application>
3126
</Directives>

license.md renamed to License.md

File renamed without changes.

Microsoft.Toolkit.Diagnostics/Microsoft.Toolkit.Diagnostics.csproj

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,34 +13,35 @@
1313
</Description>
1414
<PackageTags>Windows;Community;Toolkit;WCT;UWP;Incremental;Loading;Collection;IncrementalLoadingCollection;String;Array;extensions;helpers</PackageTags>
1515
</PropertyGroup>
16+
1617
<Choose>
17-
<When Condition=" '$(TargetFramework)' == 'netstandard1.4' ">
18+
<When Condition="'$(TargetFramework)' == 'netstandard1.4'">
19+
<!-- .NET Standard 1.4 doesn't have the Span<T> type, ValueTuple or the [Pure] attribute -->
1820
<ItemGroup>
19-
20-
<!-- .NET Standard 1.4 doesn't have the Span<T> type, ValueTuple or the [Pure] attribute -->
2121
<PackageReference Include="System.Diagnostics.Contracts" Version="4.3.0" />
2222
<PackageReference Include="System.ValueTuple" Version="4.5.0" />
2323
<PackageReference Include="System.Memory" Version="4.5.4" />
2424
</ItemGroup>
2525
</When>
26-
<When Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
27-
<ItemGroup>
2826

29-
<!-- .NET Standard 2.0 doesn't have the Span<T> type -->
27+
<When Condition="'$(TargetFramework)' == 'netstandard2.0'">
28+
<!-- .NET Standard 2.0 doesn't have the Span<T> type -->
29+
<ItemGroup>
3030
<PackageReference Include="System.Memory" Version="4.5.4" />
3131
</ItemGroup>
3232
</When>
33-
<When Condition=" '$(TargetFramework)' == 'netstandard2.1' ">
33+
34+
<When Condition="'$(TargetFramework)' == 'netstandard2.1'">
3435
<PropertyGroup>
3536
<DefineConstants>NETSTANDARD2_1_OR_GREATER</DefineConstants>
3637
</PropertyGroup>
38+
<!-- .NET Standard 2.1 doesn't have the Unsafe type -->
3739
<ItemGroup>
38-
39-
<!-- .NET Standard 2.1 doesn't have the Unsafe type -->
4040
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="5.0.0" />
4141
</ItemGroup>
4242
</When>
43-
<When Condition=" '$(TargetFramework)' == 'net5.0' ">
43+
44+
<When Condition="'$(TargetFramework)' == 'net5.0'">
4445
<PropertyGroup>
4546
<DefineConstants>NETSTANDARD2_1_OR_GREATER</DefineConstants>
4647
</PropertyGroup>

Microsoft.Toolkit.HighPerformance/Microsoft.Toolkit.HighPerformance.csproj

Lines changed: 50 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,19 @@
2424
</Description>
2525
<PackageTags>Windows;Community;Toolkit;WCT;UWP;core;standard;unsafe;span;memory;string;array;stream;buffer;extensions;helpers;parallel;performance</PackageTags>
2626
</PropertyGroup>
27+
2728
<Choose>
28-
<When Condition=" '$(TargetFramework)' == 'netstandard1.4' ">
29+
<When Condition="'$(TargetFramework)' == 'netstandard1.4'">
30+
<!--
31+
.NET Standard 1.4 lacks the [Pure] attribute, the Rectangle primitive,
32+
the Span<T> and Memory<T> types, the Vector<T> primitive and related APIs,
33+
ValueTask and ValueTask<T>, the Parallel class and the Unsafe class.
34+
We also need to reference the System.Runtime.CompilerServices.Unsafe package directly,
35+
even though System.Memory references it already, as we need a more recent version than
36+
the one bundled with it. This is so that we can use the Unsafe.Unbox<T> method,
37+
which is used by the Box<T> type in the package.
38+
-->
2939
<ItemGroup>
30-
31-
<!-- .NET Standard 1.4 lacks the [Pure] attribute, the Rectangle primitive,
32-
the Span<T> and Memory<T> types, the Vector<T> primitive and related APIs,
33-
ValueTask and ValueTask<T>, the Parallel class and the Unsafe class.
34-
We also need to reference the System.Runtime.CompilerServices.Unsafe package directly,
35-
even though System.Memory references it already, as we need a more recent version than
36-
the one bundled with it. This is so that we can use the Unsafe.Unbox<T> method,
37-
which is used by the Box<T> type in the package. -->
3840
<PackageReference Include="System.Diagnostics.Contracts" Version="4.3.0" />
3941
<PackageReference Include="System.Drawing.Primitives" Version="4.3.0" />
4042
<PackageReference Include="System.Memory" Version="4.5.4" />
@@ -44,65 +46,70 @@
4446
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="5.0.0" />
4547
</ItemGroup>
4648
</When>
47-
<When Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
48-
<ItemGroup>
4949

50-
<!-- .NET Standard 2.0 doesn't have the Span<T>, HashCode and ValueTask types -->
50+
<When Condition="'$(TargetFramework)' == 'netstandard2.0'">
51+
<!-- .NET Standard 2.0 doesn't have the Span<T>, HashCode and ValueTask types -->
52+
<ItemGroup>
5153
<PackageReference Include="Microsoft.Bcl.HashCode" Version="1.1.0" />
5254
<PackageReference Include="System.Memory" Version="4.5.4" />
5355
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.4" />
5456
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="5.0.0" />
5557
</ItemGroup>
5658
</When>
57-
<When Condition=" '$(TargetFramework)' == 'netstandard2.1' ">
58-
<ItemGroup>
5959

60-
<!-- .NET Standard 2.1 doesn't have the Unsafe type -->
61-
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="5.0.0" />
62-
</ItemGroup>
63-
<PropertyGroup>
64-
65-
<!-- NETSTANDARD2_1_OR_GREATER: includes both .NET Standard 2.1 and .NET Core 3.1.
66-
This is needed because .NET Core 3.1 will be a separate package than .NET Standard 2.1. -->
60+
<When Condition="'$(TargetFramework)' == 'netstandard2.1'">
61+
<!--
62+
NETSTANDARD2_1_OR_GREATER: includes both .NET Standard 2.1 and .NET Core 3.1.
63+
This is needed because .NET Core 3.1 will be a separate package than .NET Standard 2.1.
6764
68-
<!-- SPAN_RUNTIME_SUPPORT: define a constant to indicate runtimes with runtime support for
69-
the fast Span<T> type, as well as some overloads with Span<T> parameters (eg. Stream.Write).
70-
In particular, these are runtimes which are able to create Span<T> instances from just
71-
a managed reference, which can be used to slice arbitrary objects not technically supported.
72-
This API (MemoryMarshal.CreateSpan) is not part of .NET Standard 2.0, but it is still
73-
available on .NET Core 2.1. So by using this constant, we can make sure to expose those
74-
APIs relying on that method on all target frameworks that are able to support them. -->
75-
<DefineConstants>NETSTANDARD2_1_OR_GREATER;SPAN_RUNTIME_SUPPORT</DefineConstants>
76-
</PropertyGroup>
77-
</When>
78-
<When Condition=" '$(TargetFramework)' == 'net5.0' ">
65+
SPAN_RUNTIME_SUPPORT: define a constant to indicate runtimes with runtime support for
66+
the fast Span<T> type, as well as some overloads with Span<T> parameters (eg. Stream.Write).
67+
In particular, these are runtimes which are able to create Span<T> instances from just
68+
a managed reference, which can be used to slice arbitrary objects not technically supported.
69+
This API (MemoryMarshal.CreateSpan) is not part of .NET Standard 2.0, but it is still
70+
available on .NET Core 2.1. So by using this constant, we can make sure to expose those
71+
APIs relying on that method on all target frameworks that are able to support them.
72+
-->
7973
<PropertyGroup>
8074
<DefineConstants>NETSTANDARD2_1_OR_GREATER;SPAN_RUNTIME_SUPPORT</DefineConstants>
8175
</PropertyGroup>
82-
</When>
83-
<When Condition=" '$(TargetFramework)' == 'netcoreapp3.1' ">
76+
<!-- .NET Standard 2.1 doesn't have the Unsafe type -->
8477
<ItemGroup>
8578
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="5.0.0" />
8679
</ItemGroup>
80+
</When>
81+
82+
<When Condition="'$(TargetFramework)' == 'net5.0'">
8783
<PropertyGroup>
84+
<DefineConstants>NETSTANDARD2_1_OR_GREATER;SPAN_RUNTIME_SUPPORT</DefineConstants>
85+
</PropertyGroup>
86+
</When>
8887

89-
<!-- NETCORE_RUNTIME: to avoid issues with APIs that assume a specific memory layout, we define a
90-
.NET Core runtime constant to indicate either .NET Core 2.1 or .NET Core 3.1. These are
91-
runtimes with the same overall memory layout for objects (in particular: strings, SZ arrays,
92-
and ND arrays). We can use this constant to make sure that APIs that are exclusively available
93-
for .NET Standard targets do not make any assumtpion of any internals of the runtime being
94-
actually used by the consumers. .NET 5.0 would fall into this category as well, but we don't
95-
need to include that target as it offers APIs that don't require runtime-based workarounds.-->
88+
<When Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
89+
<!--
90+
NETCORE_RUNTIME: to avoid issues with APIs that assume a specific memory layout, we define a
91+
.NET Core runtime constant to indicate either .NET Core 2.1 or .NET Core 3.1. These are
92+
runtimes with the same overall memory layout for objects (in particular: strings, SZ arrays,
93+
and ND arrays). We can use this constant to make sure that APIs that are exclusively available
94+
for .NET Standard targets do not make any assumtpion of any internals of the runtime being
95+
actually used by the consumers. .NET 5.0 would fall into this category as well, but we don't
96+
need to include that target as it offers APIs that don't require runtime-based workarounds.
97+
-->
98+
<PropertyGroup>
9699
<DefineConstants>NETSTANDARD2_1_OR_GREATER;SPAN_RUNTIME_SUPPORT;NETCORE_RUNTIME</DefineConstants>
97100
</PropertyGroup>
98-
</When>
99-
<When Condition=" '$(TargetFramework)' == 'netcoreapp2.1' ">
100101
<ItemGroup>
101102
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="5.0.0" />
102103
</ItemGroup>
104+
</When>
105+
106+
<When Condition="'$(TargetFramework)' == 'netcoreapp2.1'">
103107
<PropertyGroup>
104108
<DefineConstants>SPAN_RUNTIME_SUPPORT;NETCORE_RUNTIME</DefineConstants>
105109
</PropertyGroup>
110+
<ItemGroup>
111+
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="5.0.0" />
112+
</ItemGroup>
106113
</When>
107114
</Choose>
108115

Microsoft.Toolkit.Mvvm/Microsoft.Toolkit.Mvvm.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@
2121
</PropertyGroup>
2222

2323
<!-- .NET Standard 2.0 doesn't have the Span<T> and IAsyncEnumerable<T> types -->
24-
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
24+
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
2525
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="5.0.0" />
2626
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
2727
<PackageReference Include="System.Memory" Version="4.5.4" />
2828
</ItemGroup>
2929

3030
<!-- .NET Standard 2.1 doesn't have the Unsafe type -->
31-
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.1' ">
31+
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.1'">
3232
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
3333
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="5.0.0" />
3434
</ItemGroup>

0 commit comments

Comments
 (0)