You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// This class provides static methods helper for executing code in UI thread of the main window.
14
14
/// </summary>
15
-
[Obsolete]
15
+
[Obsolete("Replace calls to APIs in this class with extensions for the Windows.System.DispatcherQueue type (see https://docs.microsoft.com/uwp/api/windows.system.dispatcherqueue).")]
16
16
publicstaticclassDispatcherHelper
17
17
{
18
18
/// <summary>
@@ -22,6 +22,7 @@ public static class DispatcherHelper
22
22
/// <param name="priority">Dispatcher execution priority, default is normal.</param>
23
23
/// <returns>An awaitable <see cref="Task"/> for the operation.</returns>
24
24
/// <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).")]
@@ -147,6 +155,7 @@ public static Task<T> ExecuteOnUIThreadAsync<T>(this CoreApplicationView viewToE
147
155
/// <param name="priority">Dispatcher execution priority, default is normal.</param>
148
156
/// <returns>An awaitable <see cref="Task"/> for the operation.</returns>
149
157
/// <remarks>If the current thread has UI access, <paramref name="function"/> will be invoked directly.</remarks>
158
+
[Obsolete("This method should be replaced with dispatcherQueue.EnqueueAsync(function, priority). A queue can be retrieved with DispatcherQueue.GetForCurrentThread().")]
/// <param name="priority">Dispatcher execution priority, default is normal.</param>
200
209
/// <returns>An awaitable <see cref="Task{T}"/> for the operation.</returns>
201
210
/// <remarks>If the current thread has UI access, <paramref name="function"/> will be invoked directly.</remarks>
211
+
[Obsolete("This method should be replaced with dispatcherQueue.EnqueueAsync(function, priority). A queue can be retrieved with DispatcherQueue.GetForCurrentThread().")]
/// <param name="priority">Dispatcher execution priority, default is normal.</param>
245
255
/// <returns>An awaitable <see cref="Task"/> for the operation.</returns>
246
256
/// <remarks>If the current thread has UI access, <paramref name="function"/> will be invoked directly.</remarks>
257
+
[Obsolete("This method should be replaced with dispatcherQueue.EnqueueAsync(function, priority). A queue can be retrieved with DispatcherQueue.GetForCurrentThread().")]
/// <param name="priority">Dispatcher execution priority, default is normal.</param>
308
319
/// <returns>An awaitable <see cref="Task{T}"/> for the operation.</returns>
309
320
/// <remarks>If the current thread has UI access, <paramref name="function"/> will be invoked directly.</remarks>
321
+
[Obsolete("This method should be replaced with dispatcherQueue.EnqueueAsync(function, priority). A queue can be retrieved with DispatcherQueue.GetForCurrentThread().")]
0 commit comments