-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix DispatcherQueueTimerExtensions example #688
base: main
Are you sure you want to change the base?
Conversation
DispatcherQueueTimer does not have a public constructor. Update example to show how to create a DispatcherQueueTimer instance similar to https://github.com/MicrosoftDocs/winapps-winrt-api/blob/4a912fdbae00a0594556d2a3fbb9f721469b4bfe/microsoft.ui.dispatching/dispatcherqueuetimer.md#-examples.
Learn Build status updates of commit 8cb933a:
|
File | Status | Preview URL | Details |
---|---|---|---|
docs/docfx.json | Details | ||
dotnet/docfx.json | Details | ||
dotnet/xml/CommunityToolkit.WinUI.UI/DispatcherQueueTimerExtensions.xml | View | Details |
docs/docfx.json
- Line 36, Column 50: [Warning: ms-prod-technology-invalid - See documentation]
Invalid value for 'ms.technology': 'windows-community-toolkit' is not valid with 'ms.prod' value 'dotnet-communitytoolkit'.
dotnet/docfx.json
- Line 54, Column 50: [Warning: ms-prod-technology-invalid - See documentation]
Invalid value for 'ms.technology': 'windows-community-toolkit' is not valid with 'ms.prod' value 'dotnet-communitytoolkit'.
dotnet/xml/CommunityToolkit.WinUI.UI/DispatcherQueueTimerExtensions.xml
- Line 0, Column 0: [Warning: xref-not-found]
Cross reference not found: 'Microsoft.UI.Dispatching.DispatcherQueueTimer'.
- Line 0, Column 0: [Warning: xref-not-found]
Cross reference not found: 'Microsoft.UI.Dispatching.DispatcherQueueTimer'.
For more details, please refer to the build report.
If you see build warnings/errors with permission issues, it might be due to single sign-on (SSO) enabled on Microsoft's GitHub organizations. Please follow instructions here to re-authorize your GitHub account to Learn Build.
Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.
For any questions, please:
- Try searching the learn.microsoft.com contributor guides
- Post your question in the Learn support channel
…tation instead More concise
Learn Build status updates of commit ba72adb:
|
File | Status | Preview URL | Details |
---|---|---|---|
docs/docfx.json | Details | ||
dotnet/docfx.json | Details | ||
dotnet/xml/CommunityToolkit.WinUI.UI/DispatcherQueueTimerExtensions.xml | View | Details |
docs/docfx.json
- Line 36, Column 50: [Warning: ms-prod-technology-invalid - See documentation]
Invalid value for 'ms.technology': 'windows-community-toolkit' is not valid with 'ms.prod' value 'dotnet-communitytoolkit'.
dotnet/docfx.json
- Line 54, Column 50: [Warning: ms-prod-technology-invalid - See documentation]
Invalid value for 'ms.technology': 'windows-community-toolkit' is not valid with 'ms.prod' value 'dotnet-communitytoolkit'.
dotnet/xml/CommunityToolkit.WinUI.UI/DispatcherQueueTimerExtensions.xml
- Line 0, Column 0: [Warning: xref-not-found]
Cross reference not found: 'Microsoft.UI.Dispatching.DispatcherQueueTimer'.
- Line 0, Column 0: [Warning: xref-not-found]
Cross reference not found: 'Microsoft.UI.Dispatching.DispatcherQueueTimer'.
For more details, please refer to the build report.
If you see build warnings/errors with permission issues, it might be due to single sign-on (SSO) enabled on Microsoft's GitHub organizations. Please follow instructions here to re-authorize your GitHub account to Learn Build.
Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.
For any questions, please:
- Try searching the learn.microsoft.com contributor guides
- Post your question in the Learn support channel
What changes to the docs does this PR provide?
This PR fixes the example documentation for DispatcherQueueTimerExtensions, which incorrectly attempts to demonstrate creating a DispatcherQueueTimer with
new DispatcherQueueTimer()
.DispatcherQueueTimer does not have such a public constructor.
The fix rewrites the example to create a DispatcherQueueTimer following https://github.com/MicrosoftDocs/winapps-winrt-api/blob/4a912fdbae00a0594556d2a3fbb9f721469b4bfe/microsoft.ui.dispatching/dispatcherqueuetimer.md#-examples.Revised, the below option is more concise.The fix rewrites the example to create a DispatcherQueueTimer following the docs for Microsoft.Toolkit.Uwp.UI.DispatcherQueueTimerExtensions, which are also correct in the case of WinUI 3:
WindowsCommunityToolkitDocs/dotnet/xml/Microsoft.Toolkit.Uwp.UI/DispatcherQueueTimerExtensions.xml
Line 58 in 58c55b6
(The only notable difference is that while in UWP the class used is Windows.System.DispatcherQueueTimer and in WinUI 3 the class used is Microsoft.UI.Dispatching.DispatcherQueueTimer, the timer creation process is the same for both.)
PR Checklist
Please check if your PR fulfills the following requirements:
dev
for new features,main
for typos/improvements)Other information