Skip to content

Commit 32e3c4b

Browse files
authored
Merge branch 'master' into jamesmcroft/3517-bladeview-automation
2 parents ad1800a + c402640 commit 32e3c4b

File tree

212 files changed

+3714
-2996
lines changed

Some content is hidden

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

212 files changed

+3714
-2996
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
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! 🎉 -->
4+
5+
36
## Fixes #
47
<!-- Add the relevant issue number after the "#" mentioned above (for ex: Fixes #1234) which will automatically close the issue once the PR is merged. -->
58

Directory.Build.props

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@
1414
<IsTestProject>$(MSBuildProjectName.Contains('Test'))</IsTestProject>
1515
<IsUwpProject Condition="'$(IsDesignProject)' != 'true'">$(MSBuildProjectName.Contains('Uwp'))</IsUwpProject>
1616
<IsSampleProject>$(MSBuildProjectName.Contains('Sample'))</IsSampleProject>
17-
<DefaultTargetPlatformVersion>19041</DefaultTargetPlatformVersion>
18-
<DefaultTargetPlatformMinVersion>17763</DefaultTargetPlatformMinVersion>
17+
<TargetPlatformBaseVersion>10.0</TargetPlatformBaseVersion>
18+
<TargetPlatformRevision>19041</TargetPlatformRevision>
19+
<TargetPlatformMinRevision>17763</TargetPlatformMinRevision>
1920
<PackageOutputPath>$(MSBuildThisFileDirectory)bin\nupkg</PackageOutputPath>
2021
</PropertyGroup>
2122

@@ -88,7 +89,6 @@
8889
</Choose>
8990

9091
<PropertyGroup Condition="'$(IsUwpProject)' == 'true'">
91-
9292
<!-- 8002 is a strong named -> non-strong-named reference -->
9393
<!-- This is valid for platforms other than .NET Framework (and is needed for the UWP targets -->
9494
<NoWarn>$(NoWarn);8002</NoWarn>
@@ -103,4 +103,7 @@
103103
<Link>stylecop.json</Link>
104104
</AdditionalFiles>
105105
</ItemGroup>
106+
107+
<Import Project="$(MSBuildThisFileDirectory)build\Windows.Toolkit.VisualStudio.Design.props" Condition="'$(IsDesignProject)' == 'true'"/>
108+
106109
</Project>

Directory.Build.targets

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,20 @@
11
<Project>
2-
<Choose>
3-
<When Condition="'$(TargetFramework)' == 'uap10.0' or '$(TargetFramework)' == 'uap10.0.17763' or '$(TargetFramework)' == 'native' or '$(TargetFramework)' == 'net461'">
4-
<!-- UAP versions for uap10.0 where TPMV isn't implied -->
5-
<PropertyGroup>
6-
<TargetPlatformVersion>10.0.$(DefaultTargetPlatformVersion).0</TargetPlatformVersion>
7-
<TargetPlatformMinVersion>10.0.$(DefaultTargetPlatformMinVersion).0</TargetPlatformMinVersion>
8-
</PropertyGroup>
92

10-
<PropertyGroup Condition="'$(DebugType)' == ''">
11-
<DebugType>Portable</DebugType>
12-
</PropertyGroup>
3+
<PropertyGroup>
4+
<UseUWP Condition="'$(TargetFramework)' == 'uap10.0' or '$(TargetFramework)' == 'uap10.0.17763' or '$(TargetFramework)' == 'native' or '$(TargetFramework)' == 'net461'">true</UseUWP>
5+
</PropertyGroup>
136

14-
<ItemGroup>
15-
<SDKReference Condition="'$(UseWindowsDesktopSdk)' == 'true' " Include="WindowsDesktop, Version=$(TargetPlatformVersion)">
16-
<Name>Windows Desktop Extensions for the UWP</Name>
17-
</SDKReference>
18-
</ItemGroup>
19-
</When>
20-
</Choose>
21-
227
<Choose>
23-
<When Condition="'$(TargetFramework.Contains(`uap10.0`))' == 'false' and '$(TargetFramework)' != 'native' and '$(IsSampleProject)' != 'true'">
8+
<When Condition="!$(TargetFramework.Contains(`uap10.0`)) and '$(TargetFramework)' != 'native' and '$(IsSampleProject)' != 'true'">
249
<PropertyGroup>
2510
<SignAssembly>true</SignAssembly>
2611
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)toolkit.snk</AssemblyOriginatorKeyFile>
2712
</PropertyGroup>
2813
</When>
2914
</Choose>
3015

16+
<Import Project="$(MSBuildThisFileDirectory)build\Windows.Toolkit.Uwp.Build.targets" Condition="'$(UseUWP)' == 'true'"/>
17+
3118
<Target Name="AddCommitHashToAssemblyAttributes" BeforeTargets="GetAssemblyAttributes">
3219
<ItemGroup>
3320
<AssemblyAttribute Include="System.Reflection.AssemblyMetadataAttribute" Condition=" '$(SourceRevisionId)' != '' ">
@@ -36,4 +23,5 @@
3623
</AssemblyAttribute>
3724
</ItemGroup>
3825
</Target>
26+
3927
</Project>
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
// See the LICENSE file in the project root for more information.
4+
5+
#if !NET5_0
6+
7+
namespace System.Runtime.CompilerServices
8+
{
9+
/// <summary>
10+
/// Used to indicate to the compiler that the <c>.locals init</c> flag should not be set in method headers.
11+
/// </summary>
12+
/// <remarks>Internal copy of the .NET 5 attribute.</remarks>
13+
[AttributeUsage(
14+
AttributeTargets.Module |
15+
AttributeTargets.Class |
16+
AttributeTargets.Struct |
17+
AttributeTargets.Interface |
18+
AttributeTargets.Constructor |
19+
AttributeTargets.Method |
20+
AttributeTargets.Property |
21+
AttributeTargets.Event,
22+
Inherited = false)]
23+
internal sealed class SkipLocalsInitAttribute : Attribute
24+
{
25+
}
26+
}
27+
28+
#endif

Microsoft.Toolkit.HighPerformance/Buffers/MemoryOwner{T}.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
using System.Diagnostics;
88
using System.Diagnostics.Contracts;
99
using System.Runtime.CompilerServices;
10-
#if NETCORE_RUNTIME
10+
#if NETCORE_RUNTIME || NET5_0
1111
using System.Runtime.InteropServices;
1212
#endif
1313
using Microsoft.Toolkit.HighPerformance.Buffers.Views;
@@ -183,7 +183,7 @@ public Span<T> Span
183183
ThrowObjectDisposedException();
184184
}
185185

186-
#if NETCORE_RUNTIME
186+
#if NETCORE_RUNTIME || NET5_0
187187
ref T r0 = ref array!.DangerousGetReferenceAt(this.start);
188188

189189
// On .NET Core runtimes, we can manually create a span from the starting reference to

Microsoft.Toolkit.HighPerformance/Buffers/SpanOwner{T}.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
using System.Diagnostics;
88
using System.Diagnostics.Contracts;
99
using System.Runtime.CompilerServices;
10-
#if NETCORE_RUNTIME
10+
#if NETCORE_RUNTIME || NET5_0
1111
using System.Runtime.InteropServices;
1212
#endif
1313
using Microsoft.Toolkit.HighPerformance.Buffers.Views;
@@ -148,7 +148,7 @@ public Span<T> Span
148148
[MethodImpl(MethodImplOptions.AggressiveInlining)]
149149
get
150150
{
151-
#if NETCORE_RUNTIME
151+
#if NETCORE_RUNTIME || NET5_0
152152
ref T r0 = ref array!.DangerousGetReference();
153153

154154
return MemoryMarshal.CreateSpan(ref r0, this.length);

Microsoft.Toolkit.HighPerformance/Buffers/StringPool.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Licensed to the .NET Foundation under one or more agreements.
1+
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
44

Microsoft.Toolkit.HighPerformance/Extensions/ArrayExtensions.1D.cs

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
using System;
66
using System.Diagnostics.Contracts;
77
using System.Runtime.CompilerServices;
8-
#if NETCORE_RUNTIME
8+
#if NETCORE_RUNTIME || NET5_0
99
using System.Runtime.InteropServices;
1010
#endif
1111
using Microsoft.Toolkit.HighPerformance.Enumerables;
@@ -30,7 +30,9 @@ public static partial class ArrayExtensions
3030
[MethodImpl(MethodImplOptions.AggressiveInlining)]
3131
public static ref T DangerousGetReference<T>(this T[] array)
3232
{
33-
#if NETCORE_RUNTIME
33+
#if NET5_0
34+
return ref MemoryMarshal.GetArrayDataReference(array);
35+
#elif NETCORE_RUNTIME
3436
var arrayData = Unsafe.As<RawArrayData>(array)!;
3537
ref T r0 = ref Unsafe.As<byte, T>(ref arrayData.Data);
3638

@@ -54,7 +56,12 @@ public static ref T DangerousGetReference<T>(this T[] array)
5456
[MethodImpl(MethodImplOptions.AggressiveInlining)]
5557
public static ref T DangerousGetReferenceAt<T>(this T[] array, int i)
5658
{
57-
#if NETCORE_RUNTIME
59+
#if NET5_0
60+
ref T r0 = ref MemoryMarshal.GetArrayDataReference(array);
61+
ref T ri = ref Unsafe.Add(ref r0, (nint)(uint)i);
62+
63+
return ref ri;
64+
#elif NETCORE_RUNTIME
5865
var arrayData = Unsafe.As<RawArrayData>(array)!;
5966
ref T r0 = ref Unsafe.As<byte, T>(ref arrayData.Data);
6067
ref T ri = ref Unsafe.Add(ref r0, (nint)(uint)i);
@@ -203,7 +210,7 @@ public static bool IsCovariant<T>(this T[] array)
203210
/// <summary>
204211
/// Throws an <see cref="OverflowException"/> when the "column" parameter is invalid.
205212
/// </summary>
206-
public static void ThrowOverflowException()
213+
private static void ThrowOverflowException()
207214
{
208215
throw new OverflowException();
209216
}

Microsoft.Toolkit.HighPerformance/Extensions/ArrayExtensions.2D.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -451,15 +451,15 @@ private static void ThrowArrayTypeMismatchException()
451451
/// <summary>
452452
/// Throws an <see cref="ArgumentOutOfRangeException"/> when the "row" parameter is invalid.
453453
/// </summary>
454-
public static void ThrowArgumentOutOfRangeExceptionForRow()
454+
private static void ThrowArgumentOutOfRangeExceptionForRow()
455455
{
456456
throw new ArgumentOutOfRangeException("row");
457457
}
458458

459459
/// <summary>
460460
/// Throws an <see cref="ArgumentOutOfRangeException"/> when the "column" parameter is invalid.
461461
/// </summary>
462-
public static void ThrowArgumentOutOfRangeExceptionForColumn()
462+
private static void ThrowArgumentOutOfRangeExceptionForColumn()
463463
{
464464
throw new ArgumentOutOfRangeException("column");
465465
}

Microsoft.Toolkit.HighPerformance/Extensions/ArrayExtensions.3D.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ public static bool IsCovariant<T>(this T[,,] array)
316316
/// <summary>
317317
/// Throws an <see cref="ArgumentOutOfRangeException"/> when the "depth" parameter is invalid.
318318
/// </summary>
319-
public static void ThrowArgumentOutOfRangeExceptionForDepth()
319+
private static void ThrowArgumentOutOfRangeExceptionForDepth()
320320
{
321321
throw new ArgumentOutOfRangeException("depth");
322322
}

0 commit comments

Comments
 (0)