Dispatcher.InvokeAsync 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
연결된 스레드 Dispatcher 에서 지정된 대리자를 비동기적으로 실행합니다.
오버로드
| Name | Description |
|---|---|
| InvokeAsync(Action) |
연결된 스레드 Action 에서 지정된 Dispatcher 비동기적으로 실행합니다. |
| InvokeAsync(Action, DispatcherPriority) |
연결된 스레드 Action 에서 지정된 Dispatcher 우선 순위에서 지정된 비동기적으로 실행합니다. |
| InvokeAsync(Action, DispatcherPriority, CancellationToken) |
연결된 스레드 Action 에서 지정된 Dispatcher 우선 순위에서 지정된 비동기적으로 실행합니다. |
| InvokeAsync<TResult>(Func<TResult>, DispatcherPriority, CancellationToken) |
연결된 스레드 Func<TResult> 에서 지정된 Dispatcher 우선 순위에서 지정된 비동기적으로 실행합니다. |
| InvokeAsync<TResult>(Func<TResult>) |
연결된 스레드 Func<TResult> 에서 지정된 Dispatcher 비동기적으로 실행합니다. |
| InvokeAsync<TResult>(Func<TResult>, DispatcherPriority) |
연결된 스레드 Func<TResult> 에서 지정된 Dispatcher 우선 순위에서 지정된 비동기적으로 실행합니다. |
InvokeAsync(Action)
연결된 스레드 Action 에서 지정된 Dispatcher 비동기적으로 실행합니다.
public:
System::Windows::Threading::DispatcherOperation ^ InvokeAsync(Action ^ callback);
public System.Windows.Threading.DispatcherOperation InvokeAsync(Action callback);
member this.InvokeAsync : Action -> System.Windows.Threading.DispatcherOperation
Public Function InvokeAsync (callback As Action) As DispatcherOperation
매개 변수
- callback
- Action
디스패처를 통해 호출할 대리자입니다.
반품
호출된 직후 InvokeAsync(Action) 반환되는 개체는 이벤트 큐에서 실행 보류 중인 대리자를 조작하는 데 사용할 수 있습니다.
설명
기본 우선 순위는 .입니다 DispatcherPriority.Normal.
이 메서드는 메서드의 동기 대응이 throw할 수 있는 모든 비사용 예외를 반환하는 작업에 저장됩니다. 예외가 반환된 작업에 저장되면 태스크가 대기될 때 해당 예외가 throw됩니다. ArgumentException같은 사용 예외는 여전히 동기적으로 던져집니다. 저장된 예외는 .에 의해 Invoke(Action)throw된 예외를 참조하세요.
적용 대상
InvokeAsync(Action, DispatcherPriority)
연결된 스레드 Action 에서 지정된 Dispatcher 우선 순위에서 지정된 비동기적으로 실행합니다.
public:
System::Windows::Threading::DispatcherOperation ^ InvokeAsync(Action ^ callback, System::Windows::Threading::DispatcherPriority priority);
public System.Windows.Threading.DispatcherOperation InvokeAsync(Action callback, System.Windows.Threading.DispatcherPriority priority);
member this.InvokeAsync : Action * System.Windows.Threading.DispatcherPriority -> System.Windows.Threading.DispatcherOperation
Public Function InvokeAsync (callback As Action, priority As DispatcherPriority) As DispatcherOperation
매개 변수
- callback
- Action
디스패처를 통해 호출할 대리자입니다.
- priority
- DispatcherPriority
의 다른 보류 중인 작업을 Dispatcher기준으로 지정된 콜백이 호출되는 순서를 결정하는 우선 순위입니다.
반품
호출된 직후 InvokeAsync(Action, DispatcherPriority) 반환되는 개체는 이벤트 큐에서 실행 보류 중인 대리자를 조작하는 데 사용할 수 있습니다.
설명
이 메서드는 메서드의 동기 대응이 throw할 수 있는 모든 비사용 예외를 반환하는 작업에 저장됩니다. 예외가 반환된 작업에 저장되면 태스크가 대기될 때 해당 예외가 throw됩니다. ArgumentException같은 사용 예외는 여전히 동기적으로 던져집니다. 저장된 예외는 .에 의해 Invoke(Action, DispatcherPriority)throw된 예외를 참조하세요.
적용 대상
InvokeAsync(Action, DispatcherPriority, CancellationToken)
연결된 스레드 Action 에서 지정된 Dispatcher 우선 순위에서 지정된 비동기적으로 실행합니다.
public:
System::Windows::Threading::DispatcherOperation ^ InvokeAsync(Action ^ callback, System::Windows::Threading::DispatcherPriority priority, System::Threading::CancellationToken cancellationToken);
public System.Windows.Threading.DispatcherOperation InvokeAsync(Action callback, System.Windows.Threading.DispatcherPriority priority, System.Threading.CancellationToken cancellationToken);
member this.InvokeAsync : Action * System.Windows.Threading.DispatcherPriority * System.Threading.CancellationToken -> System.Windows.Threading.DispatcherOperation
Public Function InvokeAsync (callback As Action, priority As DispatcherPriority, cancellationToken As CancellationToken) As DispatcherOperation
매개 변수
- callback
- Action
디스패처를 통해 호출할 대리자입니다.
- priority
- DispatcherPriority
의 다른 보류 중인 작업을 Dispatcher기준으로 지정된 콜백이 호출되는 순서를 결정하는 우선 순위입니다.
- cancellationToken
- CancellationToken
작업을 취소할지 여부를 나타내는 개체입니다.
반품
호출된 직후 InvokeAsync(Action, DispatcherPriority, CancellationToken) 반환되는 개체는 이벤트 큐에서 실행 보류 중인 대리자를 조작하는 데 사용할 수 있습니다.
예외
취소 토큰이 취소되었습니다. 이 예외는 반환된 작업에 저장됩니다.
설명
이 메서드는 메서드의 동기 대응이 throw할 수 있는 모든 비사용 예외를 반환하는 작업에 저장됩니다. 예외가 반환된 작업에 저장되면 태스크가 대기될 때 해당 예외가 throw됩니다. ArgumentException같은 사용 예외는 여전히 동기적으로 던져집니다. 저장된 예외는 .에 의해 Invoke(Action, DispatcherPriority)throw된 예외를 참조하세요.
적용 대상
InvokeAsync<TResult>(Func<TResult>, DispatcherPriority, CancellationToken)
연결된 스레드 Func<TResult> 에서 지정된 Dispatcher 우선 순위에서 지정된 비동기적으로 실행합니다.
public:
generic <typename TResult>
System::Windows::Threading::DispatcherOperation<TResult> ^ InvokeAsync(Func<TResult> ^ callback, System::Windows::Threading::DispatcherPriority priority, System::Threading::CancellationToken cancellationToken);
public System.Windows.Threading.DispatcherOperation<TResult> InvokeAsync<TResult>(Func<TResult> callback, System.Windows.Threading.DispatcherPriority priority, System.Threading.CancellationToken cancellationToken);
member this.InvokeAsync : Func<'Result> * System.Windows.Threading.DispatcherPriority * System.Threading.CancellationToken -> System.Windows.Threading.DispatcherOperation<'Result>
Public Function InvokeAsync(Of TResult) (callback As Func(Of TResult), priority As DispatcherPriority, cancellationToken As CancellationToken) As DispatcherOperation(Of TResult)
형식 매개 변수
- TResult
지정된 대리자의 반환 값 형식입니다.
매개 변수
- callback
- Func<TResult>
디스패처를 통해 호출할 대리자입니다.
- priority
- DispatcherPriority
의 다른 보류 중인 작업을 Dispatcher기준으로 지정된 콜백이 호출되는 순서를 결정하는 우선 순위입니다.
- cancellationToken
- CancellationToken
작업을 취소할지 여부를 나타내는 개체입니다.
반품
호출된 직후 InvokeAsync<TResult>(Func<TResult>, DispatcherPriority, CancellationToken) 반환되는 개체는 이벤트 큐에서 실행 보류 중인 대리자를 조작하는 데 사용할 수 있습니다.
예외
취소 토큰이 취소되었습니다. 이 예외는 반환된 작업에 저장됩니다.
적용 대상
InvokeAsync<TResult>(Func<TResult>)
연결된 스레드 Func<TResult> 에서 지정된 Dispatcher 비동기적으로 실행합니다.
public:
generic <typename TResult>
System::Windows::Threading::DispatcherOperation<TResult> ^ InvokeAsync(Func<TResult> ^ callback);
public System.Windows.Threading.DispatcherOperation<TResult> InvokeAsync<TResult>(Func<TResult> callback);
member this.InvokeAsync : Func<'Result> -> System.Windows.Threading.DispatcherOperation<'Result>
Public Function InvokeAsync(Of TResult) (callback As Func(Of TResult)) As DispatcherOperation(Of TResult)
형식 매개 변수
- TResult
지정된 대리자의 반환 값 형식입니다.
매개 변수
- callback
- Func<TResult>
디스패처를 통해 호출할 대리자입니다.
반품
호출된 직후 InvokeAsync<TResult>(Func<TResult>) 반환되는 개체는 이벤트 큐에서 실행 보류 중인 대리자를 조작하는 데 사용할 수 있습니다.
적용 대상
InvokeAsync<TResult>(Func<TResult>, DispatcherPriority)
연결된 스레드 Func<TResult> 에서 지정된 Dispatcher 우선 순위에서 지정된 비동기적으로 실행합니다.
public:
generic <typename TResult>
System::Windows::Threading::DispatcherOperation<TResult> ^ InvokeAsync(Func<TResult> ^ callback, System::Windows::Threading::DispatcherPriority priority);
public System.Windows.Threading.DispatcherOperation<TResult> InvokeAsync<TResult>(Func<TResult> callback, System.Windows.Threading.DispatcherPriority priority);
member this.InvokeAsync : Func<'Result> * System.Windows.Threading.DispatcherPriority -> System.Windows.Threading.DispatcherOperation<'Result>
Public Function InvokeAsync(Of TResult) (callback As Func(Of TResult), priority As DispatcherPriority) As DispatcherOperation(Of TResult)
형식 매개 변수
- TResult
지정된 대리자의 반환 값 형식입니다.
매개 변수
- callback
- Func<TResult>
디스패처를 통해 호출할 대리자입니다.
- priority
- DispatcherPriority
의 다른 보류 중인 작업을 Dispatcher기준으로 지정된 콜백이 호출되는 순서를 결정하는 우선 순위입니다.
반품
호출된 직후 InvokeAsync<TResult>(Func<TResult>, DispatcherPriority) 반환되는 개체는 이벤트 큐에서 실행 보류 중인 대리자를 조작하는 데 사용할 수 있습니다.