Condividi tramite


ProgressWithCompletion<T> Constructors

Definition

Overloads

ProgressWithCompletion<T>(Action<T>)

Initializes a new instance of the ProgressWithCompletion<T> class.

ProgressWithCompletion<T>(Func<T,Task>)

Initializes a new instance of the ProgressWithCompletion<T> class.

ProgressWithCompletion<T>(Action<T>, JoinableTaskFactory)

Initializes a new instance of the ProgressWithCompletion<T> class.

ProgressWithCompletion<T>(Func<T,Task>, JoinableTaskFactory)

Initializes a new instance of the ProgressWithCompletion<T> class.

ProgressWithCompletion<T>(Action<T>)

Initializes a new instance of the ProgressWithCompletion<T> class.

public:
 ProgressWithCompletion(Action<T> ^ handler);
public ProgressWithCompletion (Action<T> handler);
new Microsoft.VisualStudio.Threading.ProgressWithCompletion<'T> : Action<'T> -> Microsoft.VisualStudio.Threading.ProgressWithCompletion<'T>
Public Sub New (handler As Action(Of T))

Parameters

handler
Action<T>

A handler to invoke for each reported progress value. Depending on the SynchronizationContext instance that is captured when this constructor is invoked, it is possible that this handler instance could be invoked concurrently with itself.

Applies to

ProgressWithCompletion<T>(Func<T,Task>)

Initializes a new instance of the ProgressWithCompletion<T> class.

public:
 ProgressWithCompletion(Func<T, System::Threading::Tasks::Task ^> ^ handler);
public ProgressWithCompletion (Func<T,System.Threading.Tasks.Task> handler);
new Microsoft.VisualStudio.Threading.ProgressWithCompletion<'T> : Func<'T, System.Threading.Tasks.Task> -> Microsoft.VisualStudio.Threading.ProgressWithCompletion<'T>
Public Sub New (handler As Func(Of T, Task))

Parameters

handler
Func<T,Task>

A handler to invoke for each reported progress value. Depending on the SynchronizationContext instance that is captured when this constructor is invoked, it is possible that this handler instance could be invoked concurrently with itself.

Applies to

ProgressWithCompletion<T>(Action<T>, JoinableTaskFactory)

Initializes a new instance of the ProgressWithCompletion<T> class.

public:
 ProgressWithCompletion(Action<T> ^ handler, Microsoft::VisualStudio::Threading::JoinableTaskFactory ^ joinableTaskFactory);
public ProgressWithCompletion (Action<T> handler, Microsoft.VisualStudio.Threading.JoinableTaskFactory? joinableTaskFactory);
new Microsoft.VisualStudio.Threading.ProgressWithCompletion<'T> : Action<'T> * Microsoft.VisualStudio.Threading.JoinableTaskFactory -> Microsoft.VisualStudio.Threading.ProgressWithCompletion<'T>
Public Sub New (handler As Action(Of T), joinableTaskFactory As JoinableTaskFactory)

Parameters

handler
Action<T>

A handler to invoke for each reported progress value. It is possible that this handler instance could be invoked concurrently with itself.

joinableTaskFactory
JoinableTaskFactory

A JoinableTaskFactory instance that can be used to mitigate deadlocks when WaitAsync(CancellationToken) is called and the handler requires the main thread.

Applies to

ProgressWithCompletion<T>(Func<T,Task>, JoinableTaskFactory)

Initializes a new instance of the ProgressWithCompletion<T> class.

public:
 ProgressWithCompletion(Func<T, System::Threading::Tasks::Task ^> ^ handler, Microsoft::VisualStudio::Threading::JoinableTaskFactory ^ joinableTaskFactory);
public ProgressWithCompletion (Func<T,System.Threading.Tasks.Task> handler, Microsoft.VisualStudio.Threading.JoinableTaskFactory? joinableTaskFactory);
new Microsoft.VisualStudio.Threading.ProgressWithCompletion<'T> : Func<'T, System.Threading.Tasks.Task> * Microsoft.VisualStudio.Threading.JoinableTaskFactory -> Microsoft.VisualStudio.Threading.ProgressWithCompletion<'T>
Public Sub New (handler As Func(Of T, Task), joinableTaskFactory As JoinableTaskFactory)

Parameters

handler
Func<T,Task>

A handler to invoke for each reported progress value. It is possible that this handler instance could be invoked concurrently with itself.

joinableTaskFactory
JoinableTaskFactory

A JoinableTaskFactory instance that can be used to mitigate deadlocks when WaitAsync(CancellationToken) is called and the handler requires the main thread.

Applies to