DelegatingJoinableTaskFactory Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
A JoinableTaskFactory base class for derived types that delegate some of their work to an existing instance.
public ref class DelegatingJoinableTaskFactory : Microsoft::VisualStudio::Threading::JoinableTaskFactory
[Windows::Foundation::Metadata::WebHostHidden]
public ref class DelegatingJoinableTaskFactory : Microsoft::VisualStudio::Threading::JoinableTaskFactory
[Windows::Foundation::Metadata::WebHostHidden]
class DelegatingJoinableTaskFactory : Microsoft::VisualStudio::Threading::JoinableTaskFactory
public class DelegatingJoinableTaskFactory : Microsoft.VisualStudio.Threading.JoinableTaskFactory
type DelegatingJoinableTaskFactory = class
inherit JoinableTaskFactory
Public Class DelegatingJoinableTaskFactory
Inherits JoinableTaskFactory
- Inheritance
Remarks
All virtual methods default to calling into the inner JoinableTaskFactory for its behavior, rather than the default behavior of the base class. This is useful because a derived-type cannot call protected methods on another instance of that type.
Constructors
DelegatingJoinableTaskFactory(JoinableTaskFactory) |
Initializes a new instance of the DelegatingJoinableTaskFactory class. |
Properties
Context |
Gets the joinable task context to which this factory belongs. (Inherited from JoinableTaskFactory) |
HangDetectionTimeout |
Gets or sets the timeout after which no activity while synchronously blocking suggests a hang has occurred. (Inherited from JoinableTaskFactory) |
UnderlyingSynchronizationContext |
Gets the underlying SynchronizationContext that controls the main thread in the host. (Inherited from JoinableTaskFactory) |
Methods
Add(JoinableTask) |
Adds the specified joinable task to the applicable collection. (Inherited from JoinableTaskFactory) |
IsWaitingOnLongRunningTask() |
Check whether the current joinableTask is waiting on a long running task. (Inherited from JoinableTaskFactory) |
OnTransitionedToMainThread(JoinableTask, Boolean) |
Raised whenever a joinable task has completed a transition to the main thread. |
OnTransitioningToMainThread(JoinableTask) |
Raised when a joinable task has requested a transition to the main thread. |
PostToUnderlyingSynchronizationContext(SendOrPostCallback, Object) |
Posts a message to the specified underlying SynchronizationContext for processing when the main thread is freely available. |
Run(Func<Task>, JoinableTaskCreationOptions) |
Runs the specified asynchronous method to completion while synchronously blocking the calling thread. (Inherited from JoinableTaskFactory) |
Run(Func<Task>) |
Runs the specified asynchronous method to completion while synchronously blocking the calling thread. (Inherited from JoinableTaskFactory) |
Run<T>(Func<Task<T>>, JoinableTaskCreationOptions) |
Runs the specified asynchronous method to completion while synchronously blocking the calling thread. (Inherited from JoinableTaskFactory) |
Run<T>(Func<Task<T>>) |
Runs the specified asynchronous method to completion while synchronously blocking the calling thread. (Inherited from JoinableTaskFactory) |
RunAsync(Func<Task>, JoinableTaskCreationOptions) |
Invokes an async delegate on the caller's thread, and yields back to the caller when the async method yields. The async delegate is invoked in such a way as to mitigate deadlocks in the event that the async method requires the main thread while the main thread is blocked waiting for the async method's completion. (Inherited from JoinableTaskFactory) |
RunAsync(Func<Task>, String, JoinableTaskCreationOptions) | (Inherited from JoinableTaskFactory) |
RunAsync(Func<Task>) |
Invokes an async delegate on the caller's thread, and yields back to the caller when the async method yields. The async delegate is invoked in such a way as to mitigate deadlocks in the event that the async method requires the main thread while the main thread is blocked waiting for the async method's completion. (Inherited from JoinableTaskFactory) |
RunAsync<T>(Func<Task<T>>, JoinableTaskCreationOptions) |
Invokes an async delegate on the caller's thread, and yields back to the caller when the async method yields. The async delegate is invoked in such a way as to mitigate deadlocks in the event that the async method requires the main thread while the main thread is blocked waiting for the async method's completion. (Inherited from JoinableTaskFactory) |
RunAsync<T>(Func<Task<T>>, String, JoinableTaskCreationOptions) | (Inherited from JoinableTaskFactory) |
RunAsync<T>(Func<Task<T>>) |
Invokes an async delegate on the caller's thread, and yields back to the caller when the async method yields. The async delegate is invoked in such a way as to mitigate deadlocks in the event that the async method requires the main thread while the main thread is blocked waiting for the async method's completion. (Inherited from JoinableTaskFactory) |
SwitchToMainThreadAsync(Boolean, CancellationToken) |
Gets an awaitable whose continuations execute on the synchronization context that this instance was initialized with, in such a way as to mitigate both deadlocks and reentrancy. (Inherited from JoinableTaskFactory) |
SwitchToMainThreadAsync(CancellationToken) |
Gets an awaitable whose continuations execute on the synchronization context that this instance was initialized with, in such a way as to mitigate both deadlocks and reentrancy. (Inherited from JoinableTaskFactory) |
WaitSynchronously(Task) |
Synchronously blocks the calling thread for the completion of the specified task. |
WaitSynchronouslyCore(Task) |
Synchronously blocks the calling thread for the completion of the specified task. (Inherited from JoinableTaskFactory) |
Extension Methods
Run(JoinableTaskFactory, String, Func<IProgress<ThreadedWaitDialogProgressData>,CancellationToken,Task>, Nullable<TimeSpan>) |
Blocks the calling (UI) thread till a cancelable, async operation completes. An optionally cancelable wait dialog is displayed if the operation takes too long. |
Run(JoinableTaskFactory, String, Func<IProgress<ThreadedWaitDialogProgressData>,Task>, Nullable<TimeSpan>) |
Blocks the calling (UI) thread till an async operation completes. An optionally cancelable wait dialog is displayed if the operation takes too long. |
Run(JoinableTaskFactory, String, String, Func<IProgress<ThreadedWaitDialogProgressData>,CancellationToken,Task>, Nullable<TimeSpan>) |
Blocks the calling (UI) thread till an async operation completes. Cancellation is offered to the user. |
Run(JoinableTaskFactory, String, String, Func<IProgress<ThreadedWaitDialogProgressData>,Task>, Nullable<TimeSpan>) |
Blocks the calling (UI) thread till an async operation completes. No cancellation is offered to the user. |
Run<T>(JoinableTaskFactory, String, Func<IProgress<ThreadedWaitDialogProgressData>,CancellationToken,Task<T>>, Nullable<TimeSpan>) |
Blocks the calling (UI) thread till a cancelable, async operation completes. An optionally cancelable wait dialog is displayed if the operation takes too long. |
Run<T>(JoinableTaskFactory, String, Func<IProgress<ThreadedWaitDialogProgressData>,Task<T>>, Nullable<TimeSpan>) |
Blocks the calling (UI) thread till an async operation completes. An optionally cancelable wait dialog is displayed if the operation takes too long. |
Run<T>(JoinableTaskFactory, String, String, Func<IProgress<ThreadedWaitDialogProgressData>,CancellationToken,Task<T>>, Nullable<TimeSpan>) |
Blocks the calling (UI) thread till an async operation completes. Cancellation is offered to the user. |
Run<T>(JoinableTaskFactory, String, String, Func<IProgress<ThreadedWaitDialogProgressData>,Task<T>>, Nullable<TimeSpan>) |
Blocks the calling (UI) thread till an async operation completes. No cancellation is offered to the user. |
RunAsync(JoinableTaskFactory, VsTaskRunContext, Func<Task>) |
Wraps the invocation of an async method such that it may execute asynchronously, but may potentially be synchronously completed (waited on) in the future. |
RunAsync<T>(JoinableTaskFactory, VsTaskRunContext, Func<Task<T>>) |
Wraps the invocation of an async method such that it may execute asynchronously, but may potentially be synchronously completed (waited on) in the future. |
RunAsyncAsVsTask<T>(JoinableTaskFactory, VsTaskRunContext, Func<CancellationToken,Task<T>>) |
Creates an IVsTask to track a cancelable async operation. |
StartOnIdle(JoinableTaskFactory, Action, VsTaskRunContext) |
Schedules a delegate for background execution on the UI thread without inheriting any claim to the UI thread from its caller. |
StartOnIdle(JoinableTaskFactory, Func<Task>, VsTaskRunContext) |
Schedules a delegate for background execution on the UI thread without inheriting any claim to the UI thread from its caller. |
WithPriority(JoinableTaskFactory, VsTaskRunContext) |
Creates a JoinableTaskFactory that schedules work with the specified Visual Studio UI thread priority. |
WithPriority(JoinableTaskFactory, Dispatcher, DispatcherPriority) |
Creates a JoinableTaskFactory that schedules work with the specified Dispatcher and DispatcherPriority. |
Applies to
Thread Safety
This type is thread-safe for all members.