In a previous posting, we introduced nested types as one of the new features in StreamInsight V1.2. The second improvement in the type system represents the other end of the complexity spectrum, namely the ability to use "primitive" event types, without any struct or class. Remember the LINQ statement to compute the distances between two vehicles in that posting:
Wouldn’t it be nice to be able to write this as:
Yes, it would – and in V1.2 you can! The type of this is now simply a CepStream<double>, and you can use it like this:
Beauty! But wait, there is more: in V1.2, we also enabled the LINQ Let clause. We can consolidate the above statements nicely into a single one:
You can find this example attached to run in LINQPad.
See how we can create a very concise StreamInsight sample over a stream of int in LINQPad:
Alright, this query doesn’t really make a lot of sense, but you get the idea. This sample is also included in the set of new LINQPad samples – just update your LINQPad driver to get them.
Regards, The StreamInsight Team