For people interested in integrating CEP with Biztalk, check out the white paper by Jesus Rodriguez at :
StreamInsight is part of SQL 2008R2. Do some reading on StreamInsight before checking out this paper.
This paper is very conceptual and does not provide any code snippets. If you are looking for some code samples, then use the samples that come with StreamInsight download and extend them.