Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
137 commits
Select commit Hold shift + click to select a range
cec5bd6
Added the Win2d Path Geometry parser.
ratishphilip Sep 26, 2020
298d22f
Merge branch 'master' into feature/win2dparser
ratishphilip Sep 29, 2020
36c5617
Merge branch 'master' into feature/win2dparser
ratishphilip Oct 15, 2020
34306d7
Merge branch 'master' into feature/win2dparser
ratishphilip Oct 21, 2020
889a59f
Added initial control
yoshiask Nov 6, 2020
a65b0a7
Added basic sample
yoshiask Nov 6, 2020
2b010ab
Moved TabbedCommandBarItem styles into separate ResourceDictionary
yoshiask Nov 6, 2020
4d8e9bf
Switch TabbedCommandBar to be a NavigationView
yoshiask Nov 6, 2020
a333234
Removed unused _ribbonNavigationView
yoshiask Nov 6, 2020
3ef7037
Merge branch 'master' into feature/tabbedcommandbar
Kyaa-dost Nov 7, 2020
f14dd7e
Fix styles and animations, allow overriding of default styles
yoshiask Nov 7, 2020
43dccca
Merge branch 'feature/tabbedcommandbar' of https://github.com/yoshias…
yoshiask Nov 7, 2020
94c5f4f
Merge branch 'master' into feature/tabbedcommandbar
yoshiask Nov 13, 2020
8779ff3
Merge branch 'master' into feature/tabbedcommandbar
yoshiask Nov 26, 2020
d6d39de
Added unit test cases for Geometry Helpers.
ratishphilip Dec 16, 2020
983a3ce
Merge branch 'feature/win2dparser' of https://github.com/ratishphilip…
ratishphilip Dec 16, 2020
609e249
updated SampleApp.csproj file to resolve conflict
ratishphilip Dec 16, 2020
7f8162a
Merge branch 'master' into feature/win2dparser
ratishphilip Dec 16, 2020
0daee1e
Updated headers.
ratishphilip Dec 16, 2020
d8e1753
Merge branch 'feature/win2dparser' of https://github.com/ratishphilip…
ratishphilip Dec 16, 2020
1ec440a
Fixed build errors. Removed unused usings.
ratishphilip Dec 16, 2020
16db83d
Merge branch 'master' into feature/win2dparser
ratishphilip Dec 18, 2020
155dc64
Merge branch 'master' into feature/win2dparser
ratishphilip Dec 18, 2020
24dfc22
Inverted horizontalChange when RTL Flow
Avid29 Dec 26, 2020
874579c
Merge branch 'master' into feature/win2dparser
ratishphilip Jan 3, 2021
7360ed9
Merge branch 'master' into feature/win2dparser
ratishphilip Jan 7, 2021
ccd7f0b
Added IsContextual and OverflowButtonAlignment properties
yoshiask Jan 7, 2021
134d14e
Merge branch 'master' into pr/3556
yoshiask Jan 8, 2021
d82454d
Merge branch 'master' into feature/win2dparser
ratishphilip Jan 9, 2021
46e88b1
Merge branch 'master' into feature/win2dparser
ratishphilip Jan 12, 2021
670bc7c
Merge branch 'master' into feature/tabbedcommandbar
yoshiask Jan 13, 2021
e696003
Use `nameof` for ContentBackground dp
yoshiask Jan 14, 2021
ae55aed
Merge branch 'master' into feature/tabbedcommandbar
Kyaa-dost Jan 14, 2021
b61a631
Implemented changes based on Sergio's review comments.
ratishphilip Jan 17, 2021
78720bc
Merge branch 'master' into feature/win2dparser
ratishphilip Jan 17, 2021
d26c3ec
Fixed build errors. (Added default option for switch case)
ratishphilip Jan 17, 2021
3b69aed
Merge branch 'feature/win2dparser' of https://github.com/ratishphilip…
ratishphilip Jan 17, 2021
cba88e9
Removed ThrowHelper.ThrowNullReferenceException which I had added.
ratishphilip Jan 18, 2021
f419f2c
Using ThrowHelper.ThrowArgument exception instead of ThrowHelper.Thro…
ratishphilip Jan 18, 2021
31eeae1
Implemented Xamllama's severl code review comments.
ratishphilip Jan 18, 2021
8a195a1
Merge branch 'master' into feature/win2dparser
ratishphilip Jan 19, 2021
42f9b5c
Added more TestCases as per code review comments.
ratishphilip Jan 20, 2021
693ddf7
Merge branch 'feature/win2dparser' of https://github.com/ratishphilip…
ratishphilip Jan 20, 2021
16fb788
Merge branch 'master' into feature/win2dparser
ratishphilip Jan 20, 2021
758d123
Merge branch 'master' into feature/tabbedcommandbar
michael-hawker Jan 21, 2021
30a5040
Removed logger from CanvasPathGeometry. Using ICanvasPathReceiver in …
ratishphilip Jan 22, 2021
c3a31f3
Merge branch 'feature/win2dparser' of https://github.com/ratishphilip…
ratishphilip Jan 22, 2021
530e722
Merge branch 'master' into feature/win2dparser
ratishphilip Jan 22, 2021
37a70ef
Parsing CanvasGeometry on Input change.
ratishphilip Jan 22, 2021
d61d202
Csproj fixes
ratishphilip Jan 22, 2021
eb7d40d
SampleApp.csproj build failure fix.
ratishphilip Jan 22, 2021
7d756c5
Build error fix.
ratishphilip Jan 22, 2021
6c63198
Merge branch 'master' into feature/win2dparser
michael-hawker Jan 22, 2021
e618fc7
CanvasGeometry path parse error now more descriptive in the Sample App.
ratishphilip Jan 22, 2021
b7a9fed
Merge branch 'feature/win2dparser' of https://github.com/ratishphilip…
ratishphilip Jan 22, 2021
92afe43
Use expression body
yoshiask Jan 22, 2021
7d535d9
Use pattern matching
yoshiask Jan 22, 2021
2f54867
Change ComboBox in sample to use MinWidth
yoshiask Jan 22, 2021
a82319f
Snooze/dismiss support in button builders
andrewleader Jan 27, 2021
18f33db
Update sample
andrewleader Jan 27, 2021
be42cc5
Merge branch 'master' into feature/win2dparser
ratishphilip Jan 27, 2021
22c9250
Tried fixing but didn't work
andrewleader Jan 28, 2021
6c30ec6
Works!
andrewleader Jan 28, 2021
b4d4dfa
Support lower min versions of UWP too
andrewleader Jan 28, 2021
ef27c15
Merge branch 'master' into feature/win2dparser
ratishphilip Jan 28, 2021
efa0ed2
Merge branch 'master' into aleader/notif-net-native-fix
Kyaa-dost Jan 28, 2021
46d93c0
Merge branch 'master' into feature/win2dparser
ratishphilip Jan 29, 2021
6d4d290
Merge branch 'master' into aleader/notif-api-consistency
andrewleader Jan 29, 2021
48c779b
Fixed exception
andrewleader Jan 30, 2021
3e55f52
Sample app now switches to Commands List pivot item to show the parsi…
ratishphilip Jan 30, 2021
2f6f192
Merge branch 'feature/win2dparser' of https://github.com/ratishphilip…
ratishphilip Jan 30, 2021
308f067
Merge branch 'master' into feature/tabbedcommandbar
yoshiask Feb 1, 2021
bac5096
Update comment in BaseObjectStorageHelper from comment in #3702
michael-hawker Feb 1, 2021
86ca210
Move DispatcherQueueTimerExtensions to Microsoft.Toolkit.Uwp
michael-hawker Feb 1, 2021
90f1cb7
Merge branch 'master' into feature/win2dparser
ratishphilip Feb 2, 2021
44a0fa0
Split Microsoft.Toolkit.Diagnostics package
Sergio0694 Feb 2, 2021
90c6f40
Fixed Diagnostics dependencies in other packages
Sergio0694 Feb 3, 2021
d6c44da
Fixed .csproj files for base and Diagnostics packages
Sergio0694 Feb 3, 2021
a86d4bd
Refactored remaining dependencies in the Toolkit
Sergio0694 Feb 3, 2021
e7d166f
Added missing references to test projects
Sergio0694 Feb 3, 2021
058c896
Added Diagnostics skoke test project
Sergio0694 Feb 3, 2021
659dbb0
Fixed T4 linked files in .csproj file
Sergio0694 Feb 3, 2021
d61cd24
Fixed an incorrect argument check
Sergio0694 Feb 4, 2021
6a33532
Moved InterspersedObservableCollection tests to Release
Sergio0694 Feb 4, 2021
5a8482b
Split Microsoft.Toolkit.Diagnostics package (#3726)
Feb 4, 2021
67e3842
Merge branch 'master' into feature/win2dparser
Sergio0694 Feb 4, 2021
4bafb55
Refactored removed Diagnostics dependency
Sergio0694 Feb 4, 2021
2dbe6fb
Merge branch 'master' into aleader/notif-net-native-fix
andrewleader Feb 4, 2021
44eb3e2
Merge pull request #3503 from ratishphilip/feature/win2dparser
michael-hawker Feb 4, 2021
5c3a6cc
Merge branch 'master' into aleader/notif-net-native-fix
andrewleader Feb 4, 2021
b22d9c7
Minor codegen improvements
Sergio0694 Jan 23, 2021
7c581ee
Moved [Memory|Span]2D types to root namespace
Sergio0694 Jan 23, 2021
4780d8b
Updated unit test files
Sergio0694 Jan 23, 2021
00677f2
Fixed some remaining unit tests
Sergio0694 Jan 24, 2021
75c8719
Support for UWP .NET Native even if devs modified their Default.rd.xm…
Feb 5, 2021
9060e8a
Fixed a bug where the area behind CommandBars during animations would…
yoshiask Feb 5, 2021
39be4e1
Merge branch 'master' into refactoring/high-performance
michael-hawker Feb 5, 2021
1ba2321
Simplified namespaces in HighPerformance package (#3687)
Feb 5, 2021
66274ca
Added AppBarSplitButtonStyle; Added contextual tab to sample; Pass Vi…
yoshiask Feb 8, 2021
1f352bf
Moved TabbedCommandBarItem default templates to TabbedCommandBarItem.…
yoshiask Feb 8, 2021
6eec4b7
Added contextual tab toggle to sample
yoshiask Feb 8, 2021
65362f0
Implemented logic to prevent hidden tabs from being selected
yoshiask Feb 8, 2021
d1fc7e5
Removed unused TemplatePart
yoshiask Feb 8, 2021
3427f41
Removed unused Footer property on TabbedCommandBarItem
yoshiask Feb 8, 2021
8762353
Updated to follow new sample page guidelines
yoshiask Feb 8, 2021
022dcff
Removed weird ItemGroup from Controls project
yoshiask Feb 8, 2021
490ff9c
Added TabbedCommandBar to controls list in description
yoshiask Feb 8, 2021
3786b84
Added basic designer metadata
yoshiask Feb 8, 2021
ebe4b09
Exposed command alignment as property; Update internal alignments on …
yoshiask Feb 8, 2021
3e91302
Merge branch 'master' into feature/tabbedcommandbar
yoshiask Feb 8, 2021
12b5068
Moved TabbedCommandBar sample to "Menus and Toolbars" subcategory
yoshiask Feb 8, 2021
7aba8b0
Merge branch 'master' into master
michael-hawker Feb 8, 2021
4fc1f0f
Added overrideable resources for colors/brushes and some styles/templ…
yoshiask Feb 8, 2021
c176aff
Renamed AcrylicTabbedCommandBarItemStyle for consistency
yoshiask Feb 8, 2021
676df13
[Bug fix] Inverted horizontalChange when in RTL FlowDirection (#3647)
Feb 9, 2021
8b97420
Merge branch 'master' into aleader/notif-api-consistency
Kyaa-dost Feb 9, 2021
5bb806e
Updated sample to use ColorPickerButton and only Segoe MDL2 icons
yoshiask Feb 9, 2021
7623297
Merge branch 'master' into move-timerext
michael-hawker Feb 9, 2021
7039036
Merge pull request #3715 from michael-hawker/move-timerext
michael-hawker Feb 9, 2021
209ea9a
Merge branch 'master' into aleader/notif-api-consistency
michael-hawker Feb 9, 2021
71608cc
Renamed AnimationSet.Ended to Completed
Sergio0694 Feb 5, 2021
e013df4
Removed unnecessary INode interface
Sergio0694 Feb 5, 2021
ba9d559
Removed leftover files from before the rewrite
Sergio0694 Feb 6, 2021
749ccc7
Fixed wording in AnimationSet.Completed XML docs
Sergio0694 Feb 8, 2021
7b4acf3
Renamed AnimationSet trigger behaviors
Sergio0694 Feb 9, 2021
10fbbad
Snooze/dismiss support in toast button builders (#3694)
Feb 9, 2021
57c20d4
Inverted contextual toggle in sample; Fixed incorrect background duri…
yoshiask Feb 9, 2021
3438d45
Remove Single Line Comment causing StyleCop Issue
michael-hawker Feb 10, 2021
68fd805
Fix Contextual Tab Sample Page
michael-hawker Feb 10, 2021
22c61b2
Merge branch 'master' into rename/animationset-ended
michael-hawker Feb 10, 2021
31b2603
Merge pull request #3734 from Sergio0694/rename/animationset-ended
michael-hawker Feb 10, 2021
8ba0622
Merge branch 'master' into feature/tabbedcommandbar
yoshiask Feb 10, 2021
b80e511
Fix ref to namespace of Debounce extention
Rosuavio Feb 10, 2021
f1f69e3
Merge pull request #3748 from RosarioPulella/fix-smaple
michael-hawker Feb 10, 2021
71efaa7
Merge branch 'master' into feature/tabbedcommandbar
Rosuavio Feb 10, 2021
e407e07
[Feature] Add TabbedCommandBar (ribbon) control (#3556)
Feb 10, 2021
ba08374
Merge branch 'master' into merge-master
Rosuavio Feb 11, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
97 changes: 97 additions & 0 deletions Microsoft.Toolkit.Diagnostics/Microsoft.Toolkit.Diagnostics.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard1.4;netstandard2.0;netstandard2.1;net5.0</TargetFrameworks>
<LangVersion>9.0</LangVersion>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Nullable>enable</Nullable>
<Title>Windows Community Toolkit Diagnostics .NET Standard</Title>
<Description>
This package includes .NET Standard code only helpers such as:
- Guard: Helper methods to verify conditions when running code.
- ThrowHelper: Helper methods to efficiently throw exceptions.
</Description>
<PackageTags>UWP Toolkit Windows IncrementalLoadingCollection String Array extensions helpers</PackageTags>
</PropertyGroup>
<Choose>
<When Condition=" '$(TargetFramework)' == 'netstandard1.4' ">
<ItemGroup>

<!-- .NET Standard 1.4 doesn't have the Span<T> type, ValueTuple or the [Pure] attribute -->
<PackageReference Include="System.Diagnostics.Contracts" Version="4.3.0" />
<PackageReference Include="System.ValueTuple" Version="4.5.0" />
<PackageReference Include="System.Memory" Version="4.5.4" />
</ItemGroup>
</When>
<When Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
<ItemGroup>

<!-- .NET Standard 2.0 doesn't have the Span<T> type -->
<PackageReference Include="System.Memory" Version="4.5.4" />
</ItemGroup>
</When>
<When Condition=" '$(TargetFramework)' == 'netstandard2.1' ">
<PropertyGroup>
<DefineConstants>NETSTANDARD2_1_OR_GREATER</DefineConstants>
</PropertyGroup>
<ItemGroup>

<!-- .NET Standard 2.1 doesn't have the Unsafe type -->
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="5.0.0" />
</ItemGroup>
</When>
<When Condition=" '$(TargetFramework)' == 'net5.0' ">
<PropertyGroup>
<DefineConstants>NETSTANDARD2_1_OR_GREATER</DefineConstants>
</PropertyGroup>
</When>
</Choose>

<ItemGroup>
<None Update="Generated\Guard.Comparable.Numeric.tt">
<Generator>TextTemplatingFileGenerator</Generator>
<LastGenOutput>Guard.Comparable.Numeric.g.cs</LastGenOutput>
</None>
<None Update="Generated\Guard.Collection.tt">
<Generator>TextTemplatingFileGenerator</Generator>
<LastGenOutput>Guard.Collection.g.cs</LastGenOutput>
</None>
<None Update="Generated\ThrowHelper.Collection.tt">
<Generator>TextTemplatingFileGenerator</Generator>
<LastGenOutput>ThrowHelper.Collection.g.cs</LastGenOutput>
</None>
<None Update="Generated\TypeInfo.ttinclude">
<Generator>TextTemplatingFileGenerator</Generator>
<LastGenOutput>TypeInfo.g.cs</LastGenOutput>
</None>
</ItemGroup>

<!-- T4 service used by the Guard APIs -->
<ItemGroup>
<Service Include="{508349b6-6b84-4df5-91f0-309beebad82d}" />
</ItemGroup>

<ItemGroup>
<Compile Update="Generated\Guard.Comparable.Numeric.g.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>Guard.Comparable.Numeric.tt</DependentUpon>
</Compile>
<Compile Update="Generated\Guard.Collection.g.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>Guard.Collection.tt</DependentUpon>
</Compile>
<Compile Update="Generated\ThrowHelper.Collection.g.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>ThrowHelper.Collection.tt</DependentUpon>
</Compile>
<Compile Update="Generated\TypeInfo.g.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>TypeInfo.ttinclude</DependentUpon>
</Compile>
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#endif
using Microsoft.Toolkit.HighPerformance.Enumerables;
using Microsoft.Toolkit.HighPerformance.Helpers.Internals;
using Microsoft.Toolkit.HighPerformance.Memory;
using RuntimeHelpers = Microsoft.Toolkit.HighPerformance.Helpers.Internals.RuntimeHelpers;

namespace Microsoft.Toolkit.HighPerformance.Extensions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
using Microsoft.Toolkit.HighPerformance.Buffers.Internals;
#endif
using Microsoft.Toolkit.HighPerformance.Helpers.Internals;
using Microsoft.Toolkit.HighPerformance.Memory;
using RuntimeHelpers = Microsoft.Toolkit.HighPerformance.Helpers.Internals.RuntimeHelpers;

namespace Microsoft.Toolkit.HighPerformance.Extensions
Expand Down
15 changes: 12 additions & 3 deletions Microsoft.Toolkit.HighPerformance/Extensions/BoolExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,14 @@ public static class BoolExtensions
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe byte ToByte(this bool flag)
{
return *(byte*)&flag;
// Whenever we need to take the address of an argument, we make a local copy first.
// This will be removed by the JIT anyway, but it can help produce better codegen and
// remove unwanted stack spills if the caller is using constant arguments. This is
// because taking the address of an argument can interfere with some of the flow
// analysis executed by the JIT, which can in some cases block constant propagation.
bool copy = flag;

return *(byte*)&copy;
}

/// <summary>
Expand Down Expand Up @@ -58,7 +65,8 @@ public static unsafe int ToInt(this bool flag)
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe int ToBitwiseMask32(this bool flag)
{
byte rangeFlag = *(byte*)&flag;
bool copy = flag;
byte rangeFlag = *(byte*)&copy;
int
negativeFlag = rangeFlag - 1,
mask = ~negativeFlag;
Expand All @@ -77,7 +85,8 @@ public static unsafe int ToBitwiseMask32(this bool flag)
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe long ToBitwiseMask64(this bool flag)
{
byte rangeFlag = *(byte*)&flag;
bool copy = flag;
byte rangeFlag = *(byte*)&copy;
long
negativeFlag = (long)rangeFlag - 1,
mask = ~negativeFlag;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
using System.IO;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
#if SPAN_RUNTIME_SUPPORT
using Microsoft.Toolkit.HighPerformance.Memory;
#endif
using MemoryStream = Microsoft.Toolkit.HighPerformance.Streams.MemoryStream;

namespace Microsoft.Toolkit.HighPerformance.Extensions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@
using System.Runtime.InteropServices;
using Microsoft.Toolkit.HighPerformance.Buffers.Internals;
using Microsoft.Toolkit.HighPerformance.Buffers.Internals.Interfaces;
#if SPAN_RUNTIME_SUPPORT
using Microsoft.Toolkit.HighPerformance.Memory;
#endif
using MemoryStream = Microsoft.Toolkit.HighPerformance.Streams.MemoryStream;

namespace Microsoft.Toolkit.HighPerformance.Extensions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
using System.Runtime.InteropServices;
using Microsoft.Toolkit.HighPerformance.Enumerables;
using Microsoft.Toolkit.HighPerformance.Helpers.Internals;
#if SPAN_RUNTIME_SUPPORT
using Microsoft.Toolkit.HighPerformance.Memory;
#endif

namespace Microsoft.Toolkit.HighPerformance.Extensions
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
using System.Runtime.InteropServices;
using Microsoft.Toolkit.HighPerformance.Enumerables;
using Microsoft.Toolkit.HighPerformance.Helpers.Internals;
#if SPAN_RUNTIME_SUPPORT
using Microsoft.Toolkit.HighPerformance.Memory;
#endif

namespace Microsoft.Toolkit.HighPerformance.Extensions
{
Expand Down
8 changes: 5 additions & 3 deletions Microsoft.Toolkit.HighPerformance/Helpers/BitHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,9 @@ public static unsafe uint SetFlag(uint value, int n, bool flag)
// and perform an OR with the resulting value of the previous
// operation. This will always guaranteed to work, thanks to the
// initial code clearing that bit before setting it again.
bool copy = flag;
uint
flag32 = *(byte*)&flag,
flag32 = *(byte*)&copy,
shift = flag32 << n,
or = and | shift;

Expand Down Expand Up @@ -378,8 +379,9 @@ public static unsafe ulong SetFlag(ulong value, int n, bool flag)
ulong
bit = 1ul << n,
not = ~bit,
and = value & not,
flag64 = *(byte*)&flag,
and = value & not;
bool copy = flag;
ulong flag64 = *(byte*)&copy,
shift = flag64 << n,
or = and | shift;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using System;
using System.Runtime.CompilerServices;
using System.Threading.Tasks;
using Microsoft.Toolkit.HighPerformance.Memory;

namespace Microsoft.Toolkit.HighPerformance.Helpers
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using System;
using System.Runtime.CompilerServices;
using System.Threading.Tasks;
using Microsoft.Toolkit.HighPerformance.Memory;

namespace Microsoft.Toolkit.HighPerformance.Helpers
{
Expand Down
4 changes: 2 additions & 2 deletions Microsoft.Toolkit.HighPerformance/Memory/Memory2D{T}.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#pragma warning disable CA2231

namespace Microsoft.Toolkit.HighPerformance.Memory
namespace Microsoft.Toolkit.HighPerformance
{
/// <summary>
/// <see cref="Memory2D{T}"/> represents a 2D region of arbitrary memory. It is to <see cref="Span2D{T}"/>
Expand Down Expand Up @@ -894,7 +894,7 @@ public override int GetHashCode()
/// <inheritdoc/>
public override string ToString()
{
return $"Microsoft.Toolkit.HighPerformance.Memory.Memory2D<{typeof(T)}>[{this.height}, {this.width}]";
return $"Microsoft.Toolkit.HighPerformance.Memory2D<{typeof(T)}>[{this.height}, {this.width}]";
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#pragma warning disable CA2231

namespace Microsoft.Toolkit.HighPerformance.Memory
namespace Microsoft.Toolkit.HighPerformance
{
/// <summary>
/// A readonly version of <see cref="Memory2D{T}"/>.
Expand Down Expand Up @@ -907,7 +907,7 @@ public override int GetHashCode()
/// <inheritdoc/>
public override string ToString()
{
return $"Microsoft.Toolkit.HighPerformance.Memory.ReadOnlyMemory2D<{typeof(T)}>[{this.height}, {this.width}]";
return $"Microsoft.Toolkit.HighPerformance.ReadOnlyMemory2D<{typeof(T)}>[{this.height}, {this.width}]";
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
using RuntimeHelpers = Microsoft.Toolkit.HighPerformance.Helpers.Internals.RuntimeHelpers;
#endif

namespace Microsoft.Toolkit.HighPerformance.Memory
namespace Microsoft.Toolkit.HighPerformance
{
/// <inheritdoc cref="ReadOnlySpan2D{T}"/>
public readonly ref partial struct ReadOnlySpan2D<T>
Expand Down
4 changes: 2 additions & 2 deletions Microsoft.Toolkit.HighPerformance/Memory/ReadOnlySpan2D{T}.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

#pragma warning disable CS0809, CA1065

namespace Microsoft.Toolkit.HighPerformance.Memory
namespace Microsoft.Toolkit.HighPerformance
{
/// <summary>
/// A readonly version of <see cref="Span2D{T}"/>.
Expand Down Expand Up @@ -974,7 +974,7 @@ public override int GetHashCode()
/// <inheritdoc/>
public override string ToString()
{
return $"Microsoft.Toolkit.HighPerformance.Memory.ReadOnlySpan2D<{typeof(T)}>[{Height}, {this.width}]";
return $"Microsoft.Toolkit.HighPerformance.ReadOnlySpan2D<{typeof(T)}>[{Height}, {this.width}]";
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
using RuntimeHelpers = Microsoft.Toolkit.HighPerformance.Helpers.Internals.RuntimeHelpers;
#endif

namespace Microsoft.Toolkit.HighPerformance.Memory
namespace Microsoft.Toolkit.HighPerformance
{
/// <inheritdoc cref="Span2D{T}"/>
public readonly ref partial struct Span2D<T>
Expand Down
4 changes: 2 additions & 2 deletions Microsoft.Toolkit.HighPerformance/Memory/Span2D{T}.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

#pragma warning disable CS0809, CA1065

namespace Microsoft.Toolkit.HighPerformance.Memory
namespace Microsoft.Toolkit.HighPerformance
{
/// <summary>
/// <see cref="Span2D{T}"/> represents a 2D region of arbitrary memory. Like the <see cref="Span{T}"/> type,
Expand Down Expand Up @@ -1130,7 +1130,7 @@ public override int GetHashCode()
/// <inheritdoc/>
public override string ToString()
{
return $"Microsoft.Toolkit.HighPerformance.Memory.Span2D<{typeof(T)}>[{Height}, {this.width}]";
return $"Microsoft.Toolkit.HighPerformance.Span2D<{typeof(T)}>[{Height}, {this.width}]";
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform" Version="$(ExtrasUwpMetaPackageVersion)" PrivateAssets="all" IsImplicitlyDefined="true" />
</ItemGroup>

<!-- In order to support .NET Native, we need to include an appropriate .rd.xml for UWP (remove from everything else) -->
<ItemGroup Condition="'$(TargetFramework)' != 'uap10.0.19041' and '$(TargetFramework)' != 'native'">
<EmbeddedResource Remove="Properties\Microsoft.Toolkit.Uwp.Notifications.rd.xml" />
</ItemGroup>

<ItemGroup>
<None Include="Microsoft.Toolkit.Uwp.Notifications.targets" Pack="true" PackagePath="build\native" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!--
This file enable reflections for Toolkit.Notifications and all of its public/private members,
enabling the library to work in .NET Native even if developers modified their default rd.xml.
See issue https://github.com/windows-toolkit/WindowsCommunityToolkit/issues/3093 for more details.
-->

<Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata">
<Library Name="Microsoft.Toolkit.Uwp.Notifications">
<!-- TODO: We can potentially minimize the metadata needed, but further
investigation is needed to fill this in and adequately test this -->
<Assembly Name="Microsoft.Toolkit.Uwp.Notifications" Dynamic="Required All" />
</Library>
</Directives>
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public ToastContentBuilder AddButton(string content, ToastActivationType activat
/// <returns>The current instance of <see cref="ToastContentBuilder"/></returns>
public ToastContentBuilder AddButton(IToastButton button)
{
if (button is ToastButton toastButton && toastButton.Content == null)
if (button is ToastButton toastButton && toastButton.Content == null && toastButton.NeedsContent())
{
throw new InvalidOperationException("Content is required on button.");
}
Expand Down
Loading