Share via


QStreamable.Take<TPayload> Method (IQOrderedWindow<TPayload>, UInt32)

Takes the top count elements from an ordered window. If there are ties, all elements with the lowest rank are returned.

Namespace:  Microsoft.ComplexEventProcessing.Linq
Assembly:  Microsoft.ComplexEventProcessing (in Microsoft.ComplexEventProcessing.dll)

Syntax

'Declaration
<ExtensionAttribute> _
Public Shared Function Take(Of TPayload) ( _
    source As IQOrderedWindow(Of TPayload), _
    count As UInteger _
) As IQWindowResult(Of TPayload)
'Usage
Dim source As IQOrderedWindow(Of TPayload)
Dim count As UInteger 
Dim returnValue As IQWindowResult(Of TPayload)

returnValue = source.Take(count)
public static IQWindowResult<TPayload> Take<TPayload>(
    this IQOrderedWindow<TPayload> source,
    uint count
)
[ExtensionAttribute]
public:
generic<typename TPayload>
static IQWindowResult<TPayload>^ Take(
    IQOrderedWindow<TPayload>^ source, 
    unsigned int count
)
static member Take : 
        source:IQOrderedWindow<'TPayload> * 
        count:uint32 -> IQWindowResult<'TPayload> 
JScript does not support generic types and methods.

Type Parameters

  • TPayload
    The payload type.

Parameters

Return Value

Type: Microsoft.ComplexEventProcessing.Linq.IQWindowResult<TPayload>
The window containing count elements.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IQOrderedWindow<TPayload>. When you use instance method syntax to call this method, omit the first parameter. For more information, see https://msdn.microsoft.com/en-us/library/bb384936(v=sql.111) or https://msdn.microsoft.com/en-us/library/bb383977(v=sql.111).

See Also

Reference

QStreamable Class

Take Overload

Microsoft.ComplexEventProcessing.Linq Namespace