AsyncCmdlet.CancelWhenStopped Method

This element is introduced in Windows PowerShell 5.0.

Namespace: Microsoft.OneGet.Utility.PowerShell
Assembly: Microsoft.OneGet.Utility.PowerShell (in Microsoft.OneGet.Utility.PowerShell.dll)

Usage

'Usage
Dim cancellable As T
Dim returnValue As T

returnValue = Me.CancelWhenStopped(cancellable)

Syntax

'Declaration
Protected Function CancelWhenStopped(Of T As ICancellable) ( _
    cancellable As T _
) As T
protected T CancelWhenStopped<T> (
    T cancellable
) where T : ICancellable
protected:
generic<typename T> where T : ICancellable
T CancelWhenStopped (
    T cancellable
)

GenericParameters

  • T

Parameters

  • cancellable

Return Value

Returns Boolean.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Target Platforms

See Also

Reference

AsyncCmdlet Class
AsyncCmdlet Members
Microsoft.OneGet.Utility.PowerShell Namespace