This topic has not yet been rated - Rate this topic

CepStream.Take<TInput, TResult> Method (CepOrderedStream<TInput>, UInt32, Expression<Func<CepRankedEvent<TInput>, TResult>>)

SQL Server 2008 R2

Takes a given number of events from each window and also evaluates the given expression. This is used for cases in which you want to project the rank into the result of Take().

Namespace:  Microsoft.ComplexEventProcessing.Linq
Assembly:  Microsoft.ComplexEventProcessing (in Microsoft.ComplexEventProcessing.dll)
public static CepStream<TResult> Take<TInput, TResult>(
	this CepOrderedStream<TInput> source,
	uint numberOfElements,
	Expression<Func<CepRankedEvent<TInput>, TResult>> resultSelector
)

Type Parameters

TInput

Payload type of input events.

TResult

Payload type of output events.

Parameters

source
Type: Microsoft.ComplexEventProcessing.Linq.CepOrderedStream<TInput>
Input stream to take events from.
numberOfElements
Type: System.UInt32
Number of elements to take.
resultSelector
Type: System.Linq.Expressions.Expression<Func<CepRankedEvent<TInput>, TResult>>
Project expression to project the ranking into the result.

Return Value

Type: Microsoft.ComplexEventProcessing.Linq.CepStream<TResult>
A stream that is the result of Take().

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type CepOrderedStream<TInput>. When you use instance method syntax to call this method, omit the first parameter. For more information, see http://msdn.microsoft.com/en-us/library/bb384936.aspx or http://msdn.microsoft.com/en-us/library/bb383977.aspx.

For more information, see TopK.

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.