API Support for IObservable and IEnumerable in StreamInsight

 

This topic summarizes the API features in StreamInsight that support event sources and sinks that implement the IObservable or IEnumerable interfaces.

The following API features support event sources that implement the IObservable or IEnumerable interfaces.

Creating inputs

Creating bound inputs

Create an input stream that is bound to an application by using one of the following overloads for the Create method of the CepStream<TPayload> class.

Creating inputs from observable input

Translate an IObservable event source into an input stream by using one of the following overloads for the ToStream method of the ObservableCepStream class.

Creating inputs from enumerable input

Translate an IEnumerable event source into an input stream by using one of the following overloads for the ToStream method of the CepStream class.

Describing the temporal characteristics

Describe the temporal characteristics of the source data by using one of the following helpers on the AdvanceTimeSettings class.

Mapping input to point, interval, and edge events

Map input data to point, interval or edge events by using the following methods in an expression passed to an overload of the ToStream method.

Mapping input to point events

Map input data to point events and the corresponding CTI events by using the following methods of the PointEvent or PointEvent<TPayload> class in an expression passed to an overload of the ToStream method.

Mapping input to interval events

Map input data to interval events and the corresponding CTI events by using the following methods of the IntervalEvent or IntervalEvent<TPayload> class in an expression passed to an overload of the ToStream method.

Creating edge events

Map input data to edge events and the corresponding CTI events by using the following methods of the EdgeEvent or EdgeEvent<TPayload> class in an expression passed to an overload of the ToStream method.

The following API features support event sinks that implement the IObservable or IEnumerable interfaces.

Creating outputs

Translate a stream of events into an IObservable output for a specific event shape by using one of the following methods of the ObservableCepStream class.

Translate a stream of events into an IEnumerable output for a specific event shape by using one of the following methods of the CepStream class.

Mapping output

Mapping observable output

Use the following methods of the ObservableCepStream to map observable output.

Mapping enumerable output

Use the following methods of the CepStream to map enumerable output.

Extended interfaces for event sinks

The methods described above for creating and filtering output return event sinks that implement interfaces that extend the base IObservable and IEnumerable interfaces. In particular, the extended interfaces let you provide a query name for debugging purposes.

Show: