CepStream.SelectMany<TInput, TBind, TResult> Method (CepStream<TInput>, Expression<Func<CepStream<TInput>, CepStream<TBind>>>, Expression<Func<TInput, TBind, TResult>>)

Produces a stream based on the cross join of two input streams.

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

Syntax

public static CepStream<TResult> SelectMany<TInput, TBind, TResult>(
    this CepStream<TInput> source,
    Expression<Func<CepStream<TInput>, CepStream<TBind>>> bind,
    Expression<Func<TInput, TBind, TResult>> selector
)

Type Parameters

  • TInput
    Payload type of events from the outer input stream.
  • TBind
    Payload type of events from the inner input stream.
  • TResult
    Payload type of result events.

Parameters

Return Value

Type: Microsoft.ComplexEventProcessing.Linq.CepStream<TResult>
A stream where the result is a cross join of the outer and inner stream.

Usage Note

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

Remarks

Note that even in a cross join, events from the inner and outer stream are only matched and output as a result of the join if their lifetimes overlap. For more information, see Joins.

Examples

In the following example, events in stream1 that have a value in payload field i that is greater than 3 are joined with events from stream2 with a value in payload field j that is less than 10.

var crossJoin = from e1 in stream1
                from e2 in stream2
                where e1.i > 3 && e2.j < 10
                select new { e1.i, e2.j };

See Also

Reference

CepStream Class

SelectMany Overload

Microsoft.ComplexEventProcessing.Linq Namespace