1
0
mirror of https://github.com/chylex/.NET-Community-Toolkit.git synced 2024-09-21 03:42:50 +02:00
Commit Graph

1970 Commits

Author SHA1 Message Date
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
05c60c3b42 Minor codegen improvements in TaskNotifier 2020-09-03 12:35:20 +02:00
msftbot[bot]
3ab0cb8697 Generic throw helper (#3455)
## Closes #3454
<!-- 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 new behavior?
<!-- Describe how was this issue resolved or changed? -->
New generic overloads for all `ThrowHelper` APIs, see linked issue for more details.

## 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-09-03 09:04:18 +00:00
Sergio Pedri
8fd921ff2b Hidden Task/Task<T> type from TaskNotifier 2020-09-03 02:03:06 +02:00
Sergio Pedri
e62f6efb0c Added TaskAccessor<TTask> API, code refactoring 2020-09-02 23:24:31 +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
515b31c32c Merge branch 'master' into feature/array-extensions-deprecation 2020-08-28 23:09:17 +02:00
Sergio Pedri
1c1ce0f15f Added ThrowHelper.Generic tests 2020-08-28 19:28:38 +02:00
Sergio Pedri
d2ad64e81b Added missing COMException throw helpers 2020-08-28 19:26:33 +02:00
Sergio Pedri
79574c31c3 Added generic ThrowHelper APIs 2020-08-28 19:19:50 +02:00
Sergio Pedri
92a65109f8 Added missing contravariant type argument modifier 2020-08-25 12:13:37 +02:00
Alexandre Zollinger Chohfi
82deab3e42 Merge branch 'master' into removeObsolete7 2020-08-24 11:43:07 -07:00
msftbot[bot]
67e40853c2 Massive amount of spelling fixes (#3434)
## Fixes #
After the last PR for minor spelling issues, I ran a spelling check on the rest of the code and found many places to fix typos. I am looking into a way to automate this into the PR checks, but this will take some effort due to needing many items added to the 'ignore' list.

## PR Type
What kind of change does this PR introduce?
- Documentation content changes
- Sample app changes

## PR Checklist

Please check if your PR fulfills the following requirements:

- [ ] 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)
- [ ] Tests for the changes have been added (for bug fixes / features) (if applicable)
- [ ] Header has been added to all new source files (run *build/UpdateHeaders.bat*)
- [X] Contains **NO** breaking changes

<!-- If this PR contains a breaking change, please describe the impact and migration path for existing applications below. 
     Please note that breaking changes are likely to be rejected. -->


## Other information
2020-08-24 16:55:32 +00:00
Sergio Pedri
1f7c28d868 Removed unnecessary visibility modifiers 2020-08-23 11:50:33 +02:00
Sergio Pedri
e096502f10 Merge branch 'master' into optimization/messenger-shared-pool 2020-08-22 01:46:23 +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
Sergio Pedri
1c1701b361 Removed deprecated extensions 2020-08-21 23:52:54 +02:00
Herrick Spencer
49835378a6 Merge branch 'master' into moreSpelling 2020-08-20 16:19:53 -07:00
Sergio Pedri
7888f124c5 Suppressed [Obsolete] warnings in tests 2020-08-21 00:45:38 +02:00
Sergio Pedri
a342072c43 Reverted an accidental incorrect [Obsolete] 2020-08-21 00:16:40 +02:00
Sergio Pedri
312faa1997 Deprecated array extensions from Microsoft.Toolkit 2020-08-21 00:15:46 +02:00
Sergio Pedri
78268a81bd Optimized T[][].ToArrayString 2020-08-21 00:10:12 +02:00
Sergio Pedri
f6a619ef05 Optimized T[].ToArrayString 2020-08-21 00:07:56 +02:00
Sergio Pedri
cef95da0b1 Optimized T[,].ToArrayString, made it self-contained 2020-08-21 00:05:08 +02:00
Alexandre Zollinger Chohfi
798ce8739f Merge branch 'master' into removeObsolete7 2020-08-20 14:06:39 -07: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:

30452cf0bb/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
Alexandre Zollinger Chohfi
df0c27a604 Removed TabView/TabViewItem, HeaderedTextBlock, and some other smaller methods marked as Obsolete. 2020-08-19 19:46:18 -07:00
Alexandre Zollinger Chohfi
fd2fd05815 Revert "Removed TabView/TabViewItem, HeaderedTextBlock, LightBehavior/AnimationExtensions.Light, and some other smaller methods marked as Obsolete."
This reverts commit 5ba776112c.
2020-08-19 19:32:08 -07:00
Alexandre Zollinger Chohfi
7ce75d412b Merge branch 'master' into removeObsolete7 2020-08-19 19:28:59 -07: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
70037aada0 Added IMessenger.Cleanup API (to help with extensibility) 2020-08-17 23:33:55 +02:00
Alexandre Zollinger Chohfi
7eee75145f Removed deprecated NotifyTaskCompletion and Singleton classes. 2020-08-17 11:55:34 -07:00
Herrick Spencer
52b29863c6 Massive spelling fixes 2020-08-17 10:25:41 -07:00
Sergio Pedri
7ea08f4f5c Tweaked XML docs and comments 2020-08-17 13:17:15 +02:00
Sergio Pedri
f7fa063345 Fixed an index exception in Messenger.Send 2020-08-17 12:50:27 +02:00
Sergio Pedri
f34a7b9191 Updated unit tests 2020-08-17 11:32:16 +02:00
Sergio Pedri
1873f47c47 Fixed some XML comments 2020-08-17 11:30:22 +02:00