Commit Graph
503 Commits
Author SHA1 Message Date
Sergio Pedri 188b641689 Minor codegen improvements for EqualityComparer<T> 2020-09-03 21:35:10 +02:00
Sergio Pedri 75cba8a66b Speed improvements in wrapping SetProperty<T> 2020-09-03 20:09:34 +02:00
Sergio Pedri 798ea71ce1 Minor codegen improvement in SetProperty with Action<T> 2020-09-03 12:55:44 +02:00
Sergio Pedri 0abb94fbc5 Added null/"" handling in ObservableValidator.GetErrors 2020-09-02 17:56:07 +02:00
Sergio Pedri 654b055d31 Removed repeated ErrorsChanged event raise 2020-09-02 17:50:52 +02:00
Sergio Pedri 7ca59e246c Removed Ioc class and MS.Ex.DI dependency 2020-08-31 23:46:42 +02:00
Sergio Pedri 14771fbbc5 Temporary reverted FieldAccessor<T> APIs
Regression to unblock UWP for now, see https://github.com/dotnet/corert/issues/8273
2020-08-31 22:35:32 +02:00
Sergio Pedri 1f7c28d868 Removed unnecessary visibility modifiers 2020-08-23 11:50:33 +02:00
Sergio Pedri 23c6a90559 Added unit tests for cancelable async commands 2020-08-22 01:16:29 +02:00
Sergio Pedri 134ba4bc31 Merge branch 'master' into feature/mvvm-preview2 2020-08-22 01:00:35 +02:00
Sergio Pedri 59f38412c8 Fixed spelling to follow conventions 2020-08-22 00:57:46 +02:00
Sergio Pedri 587c219125 Added cancelation support for async commands 2020-08-22 00:45:31 +02:00
msftbot[bot] a5017913b5 Minor codegen improvements in Microsoft.Toolkit.Collections APIs (#3439)
Quick-fix PR to remove an unnecessary `[MethodImpl(MethodImplOptions.NoInlining)]` attribute from a throw helper method.
That attribute caused the JIT not to see the throw in the body, resulting in the caller branch assuming the forward path being taken (the faulty one). This produced worse codegen, as the non-faulting path was always forced to have an extra jump ahead.

Also did another small codegen tweak and added a more detailed exception message for users.

## Leftover fix from #3260
<!-- 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 -->
- Optimization
<!-- - 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. -->
Unoptimal codegen for this throw helper method:

https://github.com/windows-toolkit/WindowsCommunityToolkit/blob/30452cf0bbf627f12825cf50bbd31b0e526b9abe/Microsoft.Toolkit/Collections/ObservableGroupedCollectionExtensions.cs#L447-L451

## What is the new behavior?
<!-- Describe how was this issue resolved or changed? -->
The JIT is now properly handling calls to this method.

## 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-08-20 09:58:58 +00:00
Sergio Pedri 94e81989ee Merge branch 'master' into minor-codegen-fix 2020-08-20 11:27:47 +02:00
Michael Hawker MSFT (XAML Llama) ad804e90c3 Merge pull request #3346 from Sergio0694/feature/throw-helpers
ThrowHelper APIs
2020-08-19 16:35:51 -07:00
Sergio Pedri 975b375066 Speed/memory improvements to SetPropertyAndNotifyOnCompletion 2020-08-19 13:45:47 +02:00
Alexandre Zollinger Chohfi b744be0122 Update Microsoft.Toolkit/Collections/ReadOnlyObservableGroupedCollection.cs 2020-08-18 15:22:16 -07:00
Sergio Pedri 2183ed757e Improved codegen, moved throw code to external method
Also added a more detailed exception message for users
2020-08-18 13:40:15 +02:00
Sergio Pedri 7316755e49 Removed incorrect MethodImpl.NoInlining attribute
Quick-fix PR to remove an unnecessary `[MethodImpl(MethodImplOptions.NoInlining)]` attribute from a throw helper method.
That attribute caused the JIT not to see the throw in the body, resulting in the caller branch assuming the forward path being taken (the faulty one).
This produced worse codegen, as the non-faulting path was always forced to have an extra jump ahead.
2020-08-18 13:24:09 +02:00
Sergio Pedri 3c2d8632d1 Removed unnecessary using directive 2020-08-18 13:19:12 +02:00
Sergio Pedri b01b9aa0bb Add XML docs for thrown exceptions 2020-08-13 18:51:08 +02:00
Sergio Pedri 6fa47ccfd5 Update ValidateProperty API to mirror SetProperty 2020-08-13 18:47:05 +02:00
Sergio Pedri a32bbfefcc Add initial version of ObservableValidator type 2020-08-13 18:32:32 +02:00
Sergio Pedri 44fcd03772 Merge branch 'master' into feature/throw-helpers 2020-08-12 13:36:59 +02:00
Sergio Pedri fc95d7e60c Fixed a build error, minor refactoring 2020-08-12 13:36:40 +02:00
Alexandre Zollinger Chohfi 4890b5ed17 Merge pull request #3420 from windows-toolkit/moreSpelling
fix some spelling
2020-08-11 15:40:38 -07:00
Kyaa Dost 28507d8761 Merge branch 'master' into moreSpelling 2020-08-11 11:24:42 -07:00
msftbot[bot] 41343d8767 Microsoft.Toolkit.Mvvm package (part 2) (#3413)
## Follow up to #3229 
<!-- Add the relevant issue number after the "#" mentioned above (for ex: Fixes #1234) which will automatically close the issue once the PR is merged. -->

### NOTE
Marking this not as a draft so that the CI will run, but added the "DO NOT MERGE ⚠" tag as we might come up with further improvements to add to this PR before actually deciding to merge this and finalize the package.

<!-- 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
 - Refactoring (no functional changes, no api changes) 
<!-- - Build or CI related changes -->
<!-- - Documentation content changes -->
<!-- - Sample app changes -->
<!-- - Other... Please describe: -->

## Notable changes
<!-- Describe how was this issue resolved or changed? -->
This PR includes some refinements and tweaks to the `Microsoft.Toolkit.Mvvm` package, like:

- Added new `ObservableRecipient.SetProperty` overloads with `Expression<Func<T>>` and `bool broadcast` params
- Fixed a possible bug in `Messenger.Type2.Equals` (just to be extra sure)
- Improved codegen for `ObservableRecipient.Set<T>(ref T, T, string)` (missing `EqualityComparer<T>.Default.Equals` inlining)

## 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-08-11 17:36:09 +00:00
Alexandre Zollinger Chohfi 4c8d87060b Merge branch 'master' into moreSpelling 2020-08-11 10:11:32 -07:00
Alexandre Zollinger Chohfi 20a26b3cb1 Merge branch 'master' into feature/mvvm-toolkit-part2 2020-08-11 10:06:07 -07:00
Alexandre Zollinger Chohfi 603da131ea Merge pull request #3410 from Sergio0694/bugfix/task-result-converter
Improved reliability of Task.GetResultOrDefault
2020-08-11 10:03:28 -07:00
Sergio PedriandMichael Hawker MSFT e143d397cb Updated package title
Co-authored-by: Michael Hawker MSFT (XAML Llama) <24302614+michael-hawker@users.noreply.github.com>
2020-08-11 18:55:29 +02:00
Sergio PedriandMichael Hawker MSFT 8dc298aa11 Improved package description
Co-authored-by: Michael Hawker MSFT (XAML Llama) <24302614+michael-hawker@users.noreply.github.com>
2020-08-11 18:49:53 +02:00
Sergio Pedri d3a693013a Updated Microsoft.Toolkit.Mvvm .csproj info 2020-08-11 18:38:13 +02:00
Sergio Pedri e42485d18c Merge branch 'master' into feature/mvvm-toolkit-part2 2020-08-08 18:03:07 +02:00
Sergio Pedri b776866aa9 Merge branch 'master' into feature/throw-helpers 2020-08-08 18:02:24 +02:00
Sergio Pedri cb3dc08fbc Minor optimization to the MessengerExtensions type 2020-08-08 17:26:30 +02:00
Alexandre Zollinger Chohfi 16f6c4687b Merge branch 'master' into bugfix/task-result-converter 2020-08-07 18:05:18 -07:00
Alexandre Zollinger Chohfi abc074389f Merge pull request #3408 from Sergio0694/bugfix/ci-memory-usage
Reduced memory usage in HighPerformance tests
2020-08-07 18:04:52 -07:00
Sergio Pedri a5edd468b0 Added missing volatile field modifier 2020-08-08 01:49:11 +02:00
Sergio Pedri 8d081ae99a Merge branch 'master' into bugfix/ci-memory-usage 2020-08-07 19:30:35 +02:00
Sergio Pedri 88c75f730a Merge pull request #3412 from windows-toolkit/hotfix-DocSpellingErrors
Fix spelling errors in .csproj and documentation files
2020-08-07 15:40:17 +02:00
Sergio Pedri d3ef8bfb07 Minor (possible) bug fix 2020-08-06 13:14:06 +02:00
Kyaa Dost 6f4b9c9f9f Update Microsoft.Toolkit.HighPerformance.csproj 2020-08-05 17:25:36 -07:00
Sergio Pedri c3a327d3a1 Minor code tweaks 2020-08-05 19:16:03 +02:00
Sergio Pedri 5c2b8b0abb Minor performance improvement for Set(ref T) overload 2020-08-05 19:11:45 +02:00
Sergio Pedri 5da28b5f7c Added SetProperty overloads with expression/broadcast 2020-08-05 18:48:44 +02:00
Sergio Pedri e5b00f85aa Added unit test for AsyncTaskMethodBuilder<T> 2020-08-05 00:22:38 +02:00
Sergio Pedri 5cba37aa57 Improved reliability of Task.GetResultOrDefault 2020-08-04 14:56:50 +02:00
Sergio Pedri 8cf39a14d7 Switched to unmanaged memory in all parallel tests 2020-08-04 13:51:49 +02:00