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().
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().