다음을 통해 공유


DispatcherExtensions.WithPriority 메서드

정의

JoinableTaskFactory 지정된 및 DispatcherPriority를 사용하여 작업을 예약하는 을 Dispatcher 만듭니다.

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

매개 변수

joinableTaskFactory
JoinableTaskFactory

사용할 기본 입니다 JoinableTaskFactory .

dispatcher
Dispatcher

예약하는 은 Dispatcher 기본 스레드에서 작동합니다.

priority
DispatcherPriority

UI 스레드에서 모든 작업을 예약하는 우선 순위이며, 가 호출되는 시기와 경우 SwitchToMainThreadAsync(CancellationToken) 및 각 비동기에서 후await의 기본 스레드로 돌아갑니다.

반환

JoinableTaskFactory 지정된 우선 순위로 비동기 작업을 예약하는 데 사용할 수 있는 입니다.

적용 대상