Commit Graph
958 Commits
Author SHA1 Message Date
Sergio Pedri 28ebcda756 Removed trailing whitespace in .csproj 2020-11-05 23:15:50 +01:00
Sergio Pedri 723be1c8c5 Tweaked MVVM Toolkit .csproj 2020-11-05 23:15:50 +01:00
Sergio Pedri 142fc1136d Reverted package update in MVVM Toolkit
Not needed yet as there are no new relevant APIs here
2020-11-05 23:15:50 +01:00
Sergio Pedri e336bda5e0 Suppressed Unsafe.As<T> nullability warnings
Working around lack of annotations below .NET Standard 2.1, see https://github.com/dotnet/runtime/pull/42827 for more info
2020-11-05 23:15:50 +01:00
Sergio Pedri 3ed5efd42b Refactored StringPool with new null ref APIs 2020-11-05 23:14:48 +01:00
Sergio Pedri 4b85110cd1 Updated package references in test projects 2020-11-05 23:14:48 +01:00
Sergio Pedri 4232e9b380 Updated HighPerformance package 2020-11-05 23:14:48 +01:00
Sergio Pedri 509c70eaf6 Updated Mvvm package 2020-11-05 23:13:50 +01:00
Michael Hawker MSFT (XAML Llama) 0d5f18d5a4 Merge pull request #3353 from Sergio0694/feature/array3d-apis
2D System.Memory-like primitives (Span2D<T>, Memory2D<T>)
2020-11-05 09:21:36 -08:00
Sergio Pedri 5210e94171 Fixed StyleCop warnings in HighPerformance tests 2020-11-05 01:34:44 +01:00
Sergio Pedri 7f83395aec Updated package description with new types 2020-11-05 00:41:10 +01:00
Sergio Pedri bdff55a2e0 Fixed XML docs for internal helpers 2020-11-04 19:31:18 +01:00
Sergio Pedri 5a54d027c1 Fixed some typos 2020-11-03 23:42:04 +01:00
Sergio Pedri 1145a4e3e9 Added more tests for invalid Memory2D<T> constructors 2020-11-03 23:40:27 +01:00
Sergio Pedri 57d77bd34a Improved some unit tests 2020-11-03 23:20:52 +01:00
Sergio Pedri ae5ba7e358 Added tests for off-by-one Get[Row|Column] for 2D arrays 2020-11-03 23:08:57 +01:00
Michael Hawker MSFT (XAML Llama) e821cf9cfa Merge branch 'master' into feature/array3d-apis 2020-11-03 09:44:28 -08:00
Sergio Pedri 166a23cc9e Minor code tweaks for clarity 2020-11-01 16:39:46 +01:00
Sergio Pedri f870cbf8a8 Minor code refactoring 2020-11-01 01:13:10 +01:00
Sergio Pedri 131509b805 Fixed bug in ReadOnlyRefEnumerable<T> implicit cast 2020-10-31 20:04:44 +01:00
Sergio Pedri 2eca42f6db Fixed bugs in unit tests 2020-10-31 19:10:44 +01:00
Sergio Pedri 55a8be0e20 Added comments to unit tests 2020-10-31 18:24:30 +01:00
Sergio Pedri 9d841afb80 Removed unnecessary covariance array checks 2020-10-31 17:13:30 +01:00
Sergio Pedri 470306e89b Improved unit test coverage for RefEnumerable<T> 2020-10-31 13:53:10 +01:00
Sergio Pedri bf7e7943f8 Tweaked some using directives 2020-10-31 13:17:45 +01:00
Sergio Pedri 1a9e532b93 Fixed a build error in the unit tests 2020-10-31 11:46:01 +01:00
Sergio Pedri 67cc61b643 Added RefEnumerable<T>.CopyTo(RefEnumerable) APIs 2020-10-30 23:53:13 +01:00
Sergio Pedri a8d55db95e Removed unnecessary EditorBrowsable attributes 2020-10-30 23:17:18 +01:00
Sergio Pedri d7c2f0e2d1 Added implicit ReadOnlyRefEnumerable operator 2020-10-30 23:15:18 +01:00
Sergio Pedri 9bb521dc05 Minor code tweaks 2020-10-30 23:08:27 +01:00
Sergio Pedri 3c91227b9d Added RefEnumerableHelper.CopyTo 2-step overload 2020-10-30 22:45:15 +01:00
Sergio Pedri f783fdc530 Code refactoring using the new helper 2020-10-30 20:23:02 +01:00
Sergio Pedri 7fca4d998d Added internal RefEnumerableHelper type 2020-10-30 20:18:08 +01:00
Sergio Pedri efdd7d8d66 Added [ReadOnly]Span.[Try]CopyTo RefEnumerable APIs 2020-10-30 18:24:01 +01:00
Sergio Pedri 426af3f579 Bug fixes, added RefEnumerable<T>.[Try]CopyFrom 2020-10-30 18:16:46 +01:00
Sergio Pedri 8c34ddc37c Added comments to DangerousGetReference tests 2020-10-29 22:22:07 +01:00
Sergio Pedri 9e1f4ebe5f Added more comments, minor code refactoring 2020-10-28 14:52:03 +01:00
msftbot[bot] 453feb11a4 Deprecated 2D array extensions from Microsoft.Toolkit (#3444)
## Part of #3062, related to #3435 
<!-- Add the relevant issue number after the "#" mentioned above (for ex: Fixes #1234) which will automatically close the issue once the PR is merged. -->

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

## PR Type
What kind of change does this PR introduce?
<!-- Please uncomment one or more that apply to this PR. -->

- Optimization
- Deprecation
<!-- - Bugfix -->
<!-- - Feature -->
<!-- - Code style update (formatting) -->
<!-- - Refactoring (no functional changes, no api changes) -->
<!-- - Build or CI related changes -->
<!-- - Documentation content changes -->
<!-- - Sample app changes -->
<!-- - Other... Please describe: -->


## What is the current behavior?
<!-- Please describe the current behavior that you are modifying, or link to a relevant issue. -->
The `Microsoft.Toolkit` package has a number of extensions for 2D arrays that are inefficient (they're both a bit slow and causing unnecessary memory allocations) and replaced by equivalent APIs in the `Microsoft.Toolkit.HighPerformance` package.

https://github.com/windows-toolkit/WindowsCommunityToolkit/blob/30452cf0bbf627f12825cf50bbd31b0e526b9abe/Microsoft.Toolkit/Extensions/ArrayExtensions.cs#L27

https://github.com/windows-toolkit/WindowsCommunityToolkit/blob/30452cf0bbf627f12825cf50bbd31b0e526b9abe/Microsoft.Toolkit/Extensions/ArrayExtensions.cs#L48

https://github.com/windows-toolkit/WindowsCommunityToolkit/blob/30452cf0bbf627f12825cf50bbd31b0e526b9abe/Microsoft.Toolkit/Extensions/ArrayExtensions.cs#L68

## What is the new behavior?
<!-- Describe how was this issue resolved or changed? -->
This PR makes these APIs obsolete, and also includes a number of small optimizations to existing code that was added during the refactoring to remove dependencies on these APIs, so that it'll be possible to remove them in the future with no issues.

## PR Checklist

Please check if your PR fulfills the following requirements:

- [X] Tested code with current [supported SDKs](../readme.md#supported)
- [ ] Pull Request has been submitted to the documentation repository [instructions](..\contributing.md#docs). Link: <!-- docs PR link -->
- [ ] ~~Sample in sample app has been added / updated (for bug fixes / features)~~
    - [ ] ~~Icon has been created (if new sample) following the [Thumbnail Style Guide and templates](https://github.com/windows-toolkit/WindowsCommunityToolkit-design-assets)~~
- [X] Tests for the changes have been added (for bug fixes / features) (if applicable)
- [X] Header has been added to all new source files (run *build/UpdateHeaders.bat*)
- [X] Contains **NO** breaking changes
2020-10-27 18:30:16 +00:00
Michael Hawker MSFT (XAML Llama) 79df6e4dc9 Merge branch 'master' into feature/array-extensions-deprecation 2020-10-27 10:48:38 -07:00
msftbot[bot] dc2e32a6ab Fixed MemoryStream seek to end validation (#3543)
<!-- 🚨 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 🚨 -->

## Fixes https://github.com/windows-toolkit/WindowsCommunityToolkit/issues/3536
<!-- Add the relevant issue number after the "#" mentioned above (for ex: Fixes #1234) which will automatically close the issue once the PR is merged. -->

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

## PR Type
What kind of change does this PR introduce?
<!-- Please uncomment one or more that apply to this PR. -->

- Bugfix
<!-- - Feature -->
<!-- - Code style update (formatting) -->
<!-- - Refactoring (no functional changes, no api changes) -->
<!-- - Build or CI related changes -->
<!-- - Documentation content changes -->
<!-- - Sample app changes -->
<!-- - Other... Please describe: -->


## What is the current behavior?
<!-- Please describe the current behavior that you are modifying, or link to a relevant issue. -->
Seeking to the end of a `Stream` from a `Memory<T>` or other types in the `HighPerformance` package throws an exception.

## What is the new behavior?
<!-- Describe how was this issue resolved or changed? -->
Seeking to the end of the stream is now allowed. This is consistent to other `Stream` types in the BCL.

## PR Checklist

Please check if your PR fulfills the following requirements:

- [X] Tested code with current [supported SDKs](../readme.md#supported)
- [ ] ~~Pull Request has been submitted to the documentation repository [instructions](..\contributing.md#docs). Link: <!-- docs PR link -->~~
- [ ] ~~Sample in sample app has been added / updated (for bug fixes / features)~~
    - [ ] ~~Icon has been created (if new sample) following the [Thumbnail Style Guide and templates](https://github.com/windows-toolkit/WindowsCommunityToolkit-design-assets)~~
- [X] Tests for the changes have been added (for bug fixes / features) (if applicable)
- [X] Header has been added to all new source files (run *build/UpdateHeaders.bat*)
- [X] Contains **NO** breaking changes
2020-10-26 17:20:48 +00:00
Sergio Pedri 174ccbe0d7 15% speedup in Span2D<T>.DangerousGetReferenceAt 2020-10-26 16:20:07 +01:00
Sergio Pedri 02bd8e4f6b Added missing overflow check, improved docs 2020-10-26 13:52:30 +01:00
Sergio Pedri 85b3f9c5c8 Updated unit tests 2020-10-25 16:42:26 +01:00
Sergio Pedri 12e592848f Minor code tweaks 2020-10-25 15:40:04 +01:00
Sergio Pedri e166c6694e Minor codegen improvement 2020-10-25 01:25:28 +02:00
Sergio Pedri aa5f5f8b22 Updated C# version in .csproj 2020-10-23 18:09:47 +02:00
Sergio Pedri 0b6628a884 Increased count batch size on x64 for long/ulong values 2020-10-23 17:50:06 +02:00
Sergio Pedri 243c3f35af More codegen improvements 2020-10-23 16:33:28 +02:00
Sergio Pedri 3c556b0846 Minor codegen improvements 2020-10-23 16:23:54 +02:00
Sergio Pedri 1c103c5fd1 Code refactoring with IntPtr to nint 2020-10-23 04:00:05 +02:00