Skip to content

Commit 9ada6d9

Browse files
committed
Updated [Obsolete] messages for DispatcherHelper
1 parent bd033e8 commit 9ada6d9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Microsoft.Toolkit.Uwp/Helpers/DispatcherHelper.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public static class DispatcherHelper
2222
/// <param name="priority">Dispatcher execution priority, default is normal.</param>
2323
/// <returns>An awaitable <see cref="Task"/> for the operation.</returns>
2424
/// <remarks>If the current thread has UI access, <paramref name="function"/> will be invoked directly.</remarks>
25-
[Obsolete("This method should be replaced with CoreApplication.MainView.DispatcherQueue.EnqueueAsync(function, priority).")]
25+
[Obsolete("This method should be replaced with dispatcherQueue.EnqueueAsync(function, priority), where dispatcherQueue is a DispatcherQueue instance that was retrieved from the UI thread and stored for later use.")]
2626
public static Task ExecuteOnUIThreadAsync(Action function, CoreDispatcherPriority priority = CoreDispatcherPriority.Normal)
2727
{
2828
return ExecuteOnUIThreadAsync(CoreApplication.MainView, function, priority);
@@ -36,7 +36,7 @@ public static Task ExecuteOnUIThreadAsync(Action function, CoreDispatcherPriorit
3636
/// <param name="priority">Dispatcher execution priority, default is normal.</param>
3737
/// <returns>An awaitable <see cref="Task{T}"/> for the operation.</returns>
3838
/// <remarks>If the current thread has UI access, <paramref name="function"/> will be invoked directly.</remarks>
39-
[Obsolete("This method should be replaced with CoreApplication.MainView.DispatcherQueue.EnqueueAsync(function, priority).")]
39+
[Obsolete("This method should be replaced with dispatcherQueue.EnqueueAsync(function, priority), where dispatcherQueue is a DispatcherQueue instance that was retrieved from the UI thread and stored for later use.")]
4040
public static Task<T> ExecuteOnUIThreadAsync<T>(Func<T> function, CoreDispatcherPriority priority = CoreDispatcherPriority.Normal)
4141
{
4242
return ExecuteOnUIThreadAsync(CoreApplication.MainView, function, priority);
@@ -49,7 +49,7 @@ public static Task<T> ExecuteOnUIThreadAsync<T>(Func<T> function, CoreDispatcher
4949
/// <param name="function">Asynchronous function to be executed asynchronously on UI thread.</param>
5050
/// <param name="priority">Dispatcher execution priority, default is normal.</param>
5151
/// <returns>An awaitable <see cref="Task"/> for the operation.</returns>
52-
[Obsolete("This method should be replaced with CoreApplication.MainView.DispatcherQueue.EnqueueAsync(function, priority).")]
52+
[Obsolete("This method should be replaced with dispatcherQueue.EnqueueAsync(function, priority), where dispatcherQueue is a DispatcherQueue instance that was retrieved from the UI thread and stored for later use.")]
5353
public static Task ExecuteOnUIThreadAsync(Func<Task> function, CoreDispatcherPriority priority = CoreDispatcherPriority.Normal)
5454
{
5555
return ExecuteOnUIThreadAsync(CoreApplication.MainView, function, priority);
@@ -63,7 +63,7 @@ public static Task ExecuteOnUIThreadAsync(Func<Task> function, CoreDispatcherPri
6363
/// <param name="function">Asynchronous function to be executed asynchronously on UI thread.</param>
6464
/// <param name="priority">Dispatcher execution priority, default is normal.</param>
6565
/// <returns>An awaitable <see cref="Task{T}"/> for the operation.</returns>
66-
[Obsolete("This method should be replaced with CoreApplication.MainView.DispatcherQueue.EnqueueAsync(function, priority).")]
66+
[Obsolete("This method should be replaced with dispatcherQueue.EnqueueAsync(function, priority), where dispatcherQueue is a DispatcherQueue instance that was retrieved from the UI thread and stored for later use.")]
6767
public static Task<T> ExecuteOnUIThreadAsync<T>(Func<Task<T>> function, CoreDispatcherPriority priority = CoreDispatcherPriority.Normal)
6868
{
6969
return ExecuteOnUIThreadAsync(CoreApplication.MainView, function, priority);

0 commit comments

Comments
 (0)