共用方式為


VsTaskLibraryHelper.ApplyCancellationToken(IVsTask, CancellationToken) Method

Definition

Signals a VS Task to abort operations as soon as possible when the specified token is canceled.

public:
[System::Runtime::CompilerServices::Extension]
 static void ApplyCancellationToken(Microsoft::VisualStudio::Shell::Interop::IVsTask ^ task, System::Threading::CancellationToken cancellationToken);
public static void ApplyCancellationToken (this Microsoft.VisualStudio.Shell.Interop.IVsTask task, System.Threading.CancellationToken cancellationToken);
static member ApplyCancellationToken : Microsoft.VisualStudio.Shell.Interop.IVsTask * System.Threading.CancellationToken -> unit
<Extension()>
Public Sub ApplyCancellationToken (task As IVsTask, cancellationToken As CancellationToken)

Parameters

task
IVsTask

The task that may be canceled.

cancellationToken
CancellationToken

The cancellation token.

Applies to