Share via


CancellableBlockingCollection.ToCancellableEnumerable Method

This element is introduced in Windows PowerShell 5.0.

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

Usage

'Usage
Dim collection As CancellableBlockingCollection(Of T)
Dim returnValue As CancellableEnumerable(Of T)

returnValue = CancellableBlockingCollection(Of T).ToCancellableEnumerable(collection)

Syntax

'Declaration
Public Shared Function ToCancellableEnumerable ( _
    collection As CancellableBlockingCollection(Of T) _
) As CancellableEnumerable(Of T)
public static CancellableEnumerable<T> ToCancellableEnumerable (
    CancellableBlockingCollection<T> collection
)
public:
static CancellableEnumerable<T>^ ToCancellableEnumerable (
    CancellableBlockingCollection<T>^ collection
)
public static CancellableEnumerable<T> ToCancellableEnumerable (
    CancellableBlockingCollection<T> collection
)
public static function ToCancellableEnumerable (
    collection : CancellableBlockingCollection<T>
) : CancellableEnumerable<T>

Parameters

  • collection

Return Value

Returns CancellableEnumerable.

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

CancellableBlockingCollection Generic Class
CancellableBlockingCollection Members
Microsoft.OneGet.Utility.Collections Namespace