Skip to content

Commit 7af85d0

Browse files
committed
Merge branch 'master' into smokeTests
2 parents 307537d + 130dbe0 commit 7af85d0

File tree

109 files changed

+420
-1538
lines changed

Some content is hidden

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

109 files changed

+420
-1538
lines changed

Directory.Build.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
<IsTestProject>$(MSBuildProjectName.Contains('Test'))</IsTestProject>
1515
<IsUwpProject Condition="'$(IsDesignProject)' != 'true'">$(MSBuildProjectName.Contains('Uwp'))</IsUwpProject>
1616
<IsSampleProject>$(MSBuildProjectName.Contains('Sample'))</IsSampleProject>
17-
<DefaultTargetPlatformVersion>18362</DefaultTargetPlatformVersion>
18-
<DefaultTargetPlatformMinVersion>16299</DefaultTargetPlatformMinVersion>
17+
<DefaultTargetPlatformVersion>19041</DefaultTargetPlatformVersion>
18+
<DefaultTargetPlatformMinVersion>17763</DefaultTargetPlatformMinVersion>
1919
<PackageOutputPath>$(MSBuildThisFileDirectory)bin\nupkg</PackageOutputPath>
2020
</PropertyGroup>
2121

Directory.Build.targets

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project>
22
<Choose>
3-
<When Condition="'$(TargetFramework)' == 'uap10.0' or '$(TargetFramework)' == 'uap10.0.16299' or '$(TargetFramework)' == 'native' or '$(TargetFramework)' == 'net461'">
3+
<When Condition="'$(TargetFramework)' == 'uap10.0' or '$(TargetFramework)' == 'uap10.0.17763' or '$(TargetFramework)' == 'native' or '$(TargetFramework)' == 'net461'">
44
<!-- UAP versions for uap10.0 where TPMV isn't implied -->
55
<PropertyGroup>
66
<TargetPlatformVersion>10.0.$(DefaultTargetPlatformVersion).0</TargetPlatformVersion>
@@ -15,9 +15,6 @@
1515
<SDKReference Condition="'$(UseWindowsDesktopSdk)' == 'true' " Include="WindowsDesktop, Version=$(TargetPlatformVersion)">
1616
<Name>Windows Desktop Extensions for the UWP</Name>
1717
</SDKReference>
18-
<SDKReference Condition="'$(UseWindowsMobileSdk)' == 'true' " Include="WindowsMobile, Version=$(TargetPlatformVersion)">
19-
<Name>Windows Mobile Extensions for the UWP</Name>
20-
</SDKReference>
2118
</ItemGroup>
2219
</When>
2320
</Choose>

GazeInputTest/GazeInputTest.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<AssemblyName>GazeInputTest</AssemblyName>
1212
<DefaultLanguage>en-US</DefaultLanguage>
1313
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
14-
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.18362.0</TargetPlatformVersion>
14+
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.19041.0</TargetPlatformVersion>
1515
<TargetPlatformMinVersion>10.0.17134.0</TargetPlatformMinVersion>
1616
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
1717
<FileAlignment>512</FileAlignment>

Microsoft.Toolkit.HighPerformance/Helpers/BitHelper.cs

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,68 @@ public static bool HasLookupFlag(uint table, int x, int min = 0)
103103
return valid;
104104
}
105105

106+
/// <summary>
107+
/// Checks whether the given value has any bytes that are set to 0.
108+
/// That is, given a <see cref="uint"/> value, which has a total of 4 bytes,
109+
/// it checks whether any of those have all the bits set to 0.
110+
/// </summary>
111+
/// <param name="value">The input value to check.</param>
112+
/// <returns>Whether <paramref name="value"/> has any bytes set to 0.</returns>
113+
/// <remarks>
114+
/// This method contains no branches.
115+
/// For more background on this subject, see <see href="https://graphics.stanford.edu/~seander/bithacks.html#ZeroInWord"/>.
116+
/// </remarks>
117+
[Pure]
118+
[MethodImpl(MethodImplOptions.AggressiveInlining)]
119+
public static bool HasZeroByte(uint value)
120+
{
121+
return ((value - 0x0101_0101u) & ~value & 0x8080_8080u) != 0;
122+
}
123+
124+
/// <summary>
125+
/// Checks whether the given value has any bytes that are set to 0.
126+
/// This method mirrors <see cref="HasZeroByte(uint)"/>, but with <see cref="ulong"/> values.
127+
/// </summary>
128+
/// <param name="value">The input value to check.</param>
129+
/// <returns>Whether <paramref name="value"/> has any bytes set to 0.</returns>
130+
[Pure]
131+
[MethodImpl(MethodImplOptions.AggressiveInlining)]
132+
public static bool HasZeroByte(ulong value)
133+
{
134+
return ((value - 0x0101_0101_0101_0101ul) & ~value & 0x8080_8080_8080_8080ul) != 0;
135+
}
136+
137+
/// <summary>
138+
/// Checks whether a byte in the input <see cref="uint"/> value matches a target value.
139+
/// </summary>
140+
/// <param name="value">The input value to check.</param>
141+
/// <param name="target">The target byte to look for.</param>
142+
/// <returns>Whether <paramref name="value"/> has any bytes set to <paramref name="target"/>.</returns>
143+
/// <remarks>
144+
/// This method contains no branches.
145+
/// For more info, see <see href="https://graphics.stanford.edu/~seander/bithacks.html#ZeroInWord"/>.
146+
/// </remarks>
147+
[Pure]
148+
[MethodImpl(MethodImplOptions.AggressiveInlining)]
149+
public static bool HasByteEqualTo(uint value, byte target)
150+
{
151+
return HasZeroByte(value ^ (0x0101_0101u * target));
152+
}
153+
154+
/// <summary>
155+
/// Checks whether a byte in the input <see cref="uint"/> value matches a target value.
156+
/// This method mirrors <see cref="HasByteEqualTo(uint,byte)"/>, but with <see cref="ulong"/> values.
157+
/// </summary>
158+
/// <param name="value">The input value to check.</param>
159+
/// <param name="target">The target byte to look for.</param>
160+
/// <returns>Whether <paramref name="value"/> has any bytes set to <paramref name="target"/>.</returns>
161+
[Pure]
162+
[MethodImpl(MethodImplOptions.AggressiveInlining)]
163+
public static bool HasByteEqualTo(ulong value, byte target)
164+
{
165+
return HasZeroByte(value ^ (0x0101_0101_0101_0101u * target));
166+
}
167+
106168
/// <summary>
107169
/// Sets a bit to a specified value.
108170
/// </summary>

Microsoft.Toolkit.Services/Microsoft.Toolkit.Services.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="MSBuild.Sdk.Extras">
22

33
<PropertyGroup>
4-
<TargetFrameworks>uap10.0.16299;netstandard2.0;NET462</TargetFrameworks>
4+
<TargetFrameworks>uap10.0.17763;netstandard2.0;NET462</TargetFrameworks>
55
<Title>Windows Community Toolkit .NET Standard Services</Title>
66
<Description>
77
This .NET standard library enables access to different data sources such as Microsoft Graph, OneDrive, Twitter, Microsoft Translator, and LinkedIn. It is part of the Windows Community Toolkit.
@@ -12,7 +12,7 @@
1212
<DeterministicSourcePaths Condition="'$(EnableSourceLink)' == ''">false</DeterministicSourcePaths>
1313
</PropertyGroup>
1414

15-
<PropertyGroup Condition="'$(TargetFramework)' == 'uap10.0.16299'">
15+
<PropertyGroup Condition="'$(TargetFramework)' == 'uap10.0.17763'">
1616
<DefineConstants Condition="'$(DisableImplicitFrameworkDefines)' != 'true'">$(DefineConstants);WINRT</DefineConstants>
1717
</PropertyGroup>
1818

@@ -31,7 +31,7 @@
3131
<PackageReference Include="System.Net.Http" Version="4.3.4" />
3232
</ItemGroup>
3333

34-
<ItemGroup Condition="'$(TargetFramework)'=='uap10.0.16299'">
34+
<ItemGroup Condition="'$(TargetFramework)'=='uap10.0.17763'">
3535
<ProjectReference Include="..\Microsoft.Toolkit.Uwp\Microsoft.Toolkit.Uwp.csproj" />
3636
</ItemGroup>
3737

@@ -47,7 +47,7 @@
4747
<PackageReference Include="Microsoft.Toolkit.Forms.UI.Controls.WebView" Version="[5.0.0-preview.gb86cb1c4cb,)" />
4848
</ItemGroup>
4949

50-
<ItemGroup Condition="!('$(TargetFramework)'=='uap10.0.16299')">
50+
<ItemGroup Condition="!('$(TargetFramework)'=='uap10.0.17763')">
5151
<Compile Remove="PlatformSpecific\Uwp\**\*" />
5252
</ItemGroup>
5353
</Project>

Microsoft.Toolkit.Uwp.Connectivity/BluetoothLEHelper/BluetoothLEHelper.cs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
using Windows.Devices.Bluetooth;
1313
using Windows.Devices.Bluetooth.Advertisement;
1414
using Windows.Devices.Enumeration;
15-
using Windows.Foundation.Metadata;
1615
using Windows.System;
1716

1817
namespace Microsoft.Toolkit.Uwp.Connectivity
@@ -27,11 +26,6 @@ public class BluetoothLEHelper
2726
/// </summary>
2827
private const string BluetoothLeDeviceWatcherAqs = "(System.Devices.Aep.ProtocolId:=\"{bb7bb05e-5972-42b5-94fc-76eaa7084d49}\")";
2928

30-
/// <summary>
31-
/// Gets a value indicating whether the Bluetooth LE Helper is supported
32-
/// </summary>
33-
private static bool? _isBluetoothLESupported = null;
34-
3529
/// <summary>
3630
/// We need to cache all DeviceInformation objects we get as they may
3731
/// get updated in the future. The update may make them eligible to be put on
@@ -82,12 +76,6 @@ private BluetoothLEHelper(DispatcherQueue dispatcherQueue = null)
8276
/// </summary>
8377
public static BluetoothLEHelper Context { get; } = new BluetoothLEHelper();
8478

85-
/// <summary>
86-
/// Gets a value indicating whether the Bluetooth LE Helper is supported.
87-
/// </summary>
88-
public static bool IsBluetoothLESupported => (bool)(_isBluetoothLESupported ??
89-
(_isBluetoothLESupported = ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 4)));
90-
9179
/// <summary>
9280
/// Gets the list of available bluetooth devices
9381
/// </summary>

Microsoft.Toolkit.Uwp.Connectivity/Microsoft.Toolkit.Uwp.Connectivity.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="MSBuild.Sdk.Extras">
22

33
<PropertyGroup>
4-
<TargetFramework>uap10.0.16299</TargetFramework>
4+
<TargetFramework>uap10.0.17763</TargetFramework>
55
<Title>Windows Community Toolkit Devices</Title>
66
<Description>This library enables easier consumption of connectivity Devices/Peripherals and handle its connection to Windows devices. It contains BluetoothLE and Network connectivity helpers.</Description>
77
<PackageTags>UWP Toolkit Windows Devices Bluetooth BluetoothLE BLE Networking</PackageTags>

Microsoft.Toolkit.Uwp.DeveloperTools/Microsoft.Toolkit.Uwp.DeveloperTools.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="MSBuild.Sdk.Extras">
22

33
<PropertyGroup>
4-
<TargetFramework>uap10.0.16299</TargetFramework>
4+
<TargetFramework>uap10.0.17763</TargetFramework>
55
<Title>Windows Community Toolkit Developer Tools</Title>
66
<Description>This library provides XAML user controls and services to help developers build their app. It is part of the Windows Community Toolkit.
77

Microsoft.Toolkit.Uwp.Input.GazeInteraction/Microsoft.Toolkit.UWP.Input.GazeInteraction.vcxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
4343
<AppContainerApplication>true</AppContainerApplication>
4444
<ApplicationType>Windows Store</ApplicationType>
45-
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
45+
<WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
4646
<WindowsTargetPlatformMinVersion>10.0.17134.0</WindowsTargetPlatformMinVersion>
4747
<ApplicationTypeRevision>10.0</ApplicationTypeRevision>
4848
<ProjectName>Microsoft.Toolkit.Uwp.Input.GazeInteraction</ProjectName>

Microsoft.Toolkit.Uwp.Notifications.JavaScript/Microsoft.Toolkit.Uwp.Notifications.JavaScript.csproj

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)