Share via


QStreamable.GroupBy<TSource, TKey, TResult> Method (IQStreamable<TSource>, Expression<Func<TSource, TKey>>, Expression<Func<TSource, TResult>>)

Partition operator.

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

Syntax

'Declaration
<ExtensionAttribute> _
Public Shared Function GroupBy(Of TSource, TKey, TResult) ( _
    source As IQStreamable(Of TSource), _
    keySelector As Expression(Of Func(Of TSource, TKey)), _
    resultSelector As Expression(Of Func(Of TSource, TResult)) _
) As IQPartitionedStreamable(Of TKey, TResult)
'Usage
Dim source As IQStreamable(Of TSource)
Dim keySelector As Expression(Of Func(Of TSource, TKey))
Dim resultSelector As Expression(Of Func(Of TSource, TResult))
Dim returnValue As IQPartitionedStreamable(Of TKey, TResult)

returnValue = source.GroupBy(keySelector, _
    resultSelector)
public static IQPartitionedStreamable<TKey, TResult> GroupBy<TSource, TKey, TResult>(
    this IQStreamable<TSource> source,
    Expression<Func<TSource, TKey>> keySelector,
    Expression<Func<TSource, TResult>> resultSelector
)
[ExtensionAttribute]
public:
generic<typename TSource, typename TKey, typename TResult>
static IQPartitionedStreamable<TKey, TResult>^ GroupBy(
    IQStreamable<TSource>^ source, 
    Expression<Func<TSource, TKey>^>^ keySelector, 
    Expression<Func<TSource, TResult>^>^ resultSelector
)
static member GroupBy : 
        source:IQStreamable<'TSource> * 
        keySelector:Expression<Func<'TSource, 'TKey>> * 
        resultSelector:Expression<Func<'TSource, 'TResult>> -> IQPartitionedStreamable<'TKey, 'TResult> 
JScript does not support generic types and methods.

Type Parameters

  • TSource
    The input payload type.
  • TKey
    The type of partition key.
  • TResult
    The type of result.

Parameters

Return Value

Type: Microsoft.ComplexEventProcessing.Linq.IQPartitionedStreamable<TKey, TResult>
The partitioned stream.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IQStreamable<TSource>. 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

GroupBy Overload

Microsoft.ComplexEventProcessing.Linq Namespace