Compartilhar via


DispatcherExtensions.WithPriority Método

Definição

Cria um JoinableTaskFactory que agenda o trabalho com o e o especificados DispatcherDispatcherPriority.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::VisualStudio::Threading::JoinableTaskFactory ^ WithPriority(Microsoft::VisualStudio::Threading::JoinableTaskFactory ^ joinableTaskFactory, System::Windows::Threading::Dispatcher ^ dispatcher, System::Windows::Threading::DispatcherPriority priority);
public static Microsoft.VisualStudio.Threading.JoinableTaskFactory WithPriority (this Microsoft.VisualStudio.Threading.JoinableTaskFactory joinableTaskFactory, System.Windows.Threading.Dispatcher dispatcher, System.Windows.Threading.DispatcherPriority priority);
static member WithPriority : Microsoft.VisualStudio.Threading.JoinableTaskFactory * System.Windows.Threading.Dispatcher * System.Windows.Threading.DispatcherPriority -> Microsoft.VisualStudio.Threading.JoinableTaskFactory
<Extension()>
Public Function WithPriority (joinableTaskFactory As JoinableTaskFactory, dispatcher As Dispatcher, priority As DispatcherPriority) As JoinableTaskFactory

Parâmetros

joinableTaskFactory
JoinableTaskFactory

O subjacente a ser JoinableTaskFactory usado.

dispatcher
Dispatcher

O Dispatcher que agenda funciona no thread main.

priority
DispatcherPriority

A prioridade com a qual agendar qualquer trabalho no thread da interface do usuário, quando e se SwitchToMainThreadAsync(CancellationToken) for chamado e para cada retorno assíncrono ao thread main após um await.

Retornos

Um JoinableTaskFactory que pode ser usado para agendar o trabalho assíncrono com a prioridade especificada.

Aplica-se a