DispatcherExtensions.WithPriority Metodo

Definizione

Crea un oggetto JoinableTaskFactory che pianifica il lavoro con l'oggetto e specificatoDispatcher.DispatcherPriority

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

Parametri

joinableTaskFactory
JoinableTaskFactory

Oggetto sottostante JoinableTaskFactory da utilizzare.

dispatcher
Dispatcher

Oggetto Dispatcher che pianifica il lavoro sul thread principale.

priority
DispatcherPriority

Priorità con cui pianificare qualsiasi lavoro sul thread dell'interfaccia utente, quando e se SwitchToMainThreadAsync(CancellationToken) viene chiamato e per ogni ritorno asincrono al thread principale dopo un oggetto await.

Restituisce

Oggetto JoinableTaskFactory che può essere utilizzato per la pianificazione del lavoro asincrono con la priorità specificata.

Si applica a