CepStream.GroupBy<TPayload, TGroupingKey, TResult> Method (CepStream<TPayload>, Expression<Func<TPayload, TGroupingKey>>, Expression<Func<TPayload, TResult>>)
Groups the source stream by the specified key selector functions and projects results using the element selector function.
Namespace: Microsoft.ComplexEventProcessing.Linq
Assembly: Microsoft.ComplexEventProcessing (in Microsoft.ComplexEventProcessing.dll)
Syntax
public static CepGroupingStreams<TResult, TGroupingKey> GroupBy<TPayload, TGroupingKey, TResult>(
this CepStream<TPayload> source,
Expression<Func<TPayload, TGroupingKey>> keySelector,
Expression<Func<TPayload, TResult>> selector
)
Type Parameters
- TPayload
Payload type of the input event.
- TGroupingKey
Grouping key event type.
- TResult
Payload type of result events.
Parameters
- source
Type: Microsoft.ComplexEventProcessing.Linq.CepStream<TPayload>
Input stream.
- keySelector
Type: System.Linq.Expressions.Expression<Func<TPayload, TGroupingKey>>
Expression that defines key value.
- selector
Type: System.Linq.Expressions.Expression<Func<TPayload, TResult>>
Expression that projects the results.
Return Value
Type: Microsoft.ComplexEventProcessing.Linq.CepGroupingStreams<TResult, TGroupingKey>
Groups of streams.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type CepStream<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.105) or https://msdn.microsoft.com/en-us/library/bb383977(v=sql.105).