In-Process Transport for the Windows Communication Foundation
I recently had a case where a thread running under one identity would process data periodically provided by a thread running under a different identity. There are lots of ways of accomplishing this, but the priority for me was to do it in such a way that the purpose of all of the code would be clear. Describing the receiver as a service, and the sender as a client was attractive for that reason, and using the Windows Communication Foundation semantics in so doing was even more attractive. However, the threads would always be within the same process, and the Windows Communication Foundation does not include an in-process, cross-thread transport by default. So I wrote a simple one. Its attached to this post for anyone else who might find it useful. It isn't a bad illustration of a custom Windows Communication Foundation transport either. In fact, I would almost certainly use it in Windows Communication Foundation Unleashed if I was writing that book now.