VsTaskLibraryHelper.CancelWhenCancellationRequested Method
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.
Ensures that task
will be canceled when cancellation is requested for
cancellationToken
.
public:
[System::Runtime::CompilerServices::Extension]
static void CancelWhenCancellationRequested(Microsoft::VisualStudio::Shell::Interop::IVsTask ^ task, Microsoft::VisualStudio::Threading::JoinableTaskFactory ^ jtf, System::Threading::CancellationToken cancellationToken);
public static void CancelWhenCancellationRequested (this Microsoft.VisualStudio.Shell.Interop.IVsTask task, Microsoft.VisualStudio.Threading.JoinableTaskFactory jtf, System.Threading.CancellationToken cancellationToken);
static member CancelWhenCancellationRequested : Microsoft.VisualStudio.Shell.Interop.IVsTask * Microsoft.VisualStudio.Threading.JoinableTaskFactory * System.Threading.CancellationToken -> unit
<Extension()>
Public Sub CancelWhenCancellationRequested (task As IVsTask, jtf As JoinableTaskFactory, cancellationToken As CancellationToken)
Parameters
- task
- IVsTask
The task to cancel.
The JoinableTaskFactory to use.
- cancellationToken
- CancellationToken
The token whose cancellation triggers the cancellation of task
.