Sdílet prostřednictvím


VsTaskLibraryHelper.CancelOnShutdown(IVsTask, AsyncPackage) Method

Definition

Ensures that task will be canceled when package is disposed. The package's Dispose method will not return until task completes.

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

Parameters

task
IVsTask

The task to cancel on shutdown

package
AsyncPackage

The package whose disposal will trigger the cancellation of task

Applies to