Appendix E. Generic Interceptor

At its core, WCF is nothing more than an extensibility model. All the built-in attributes, behaviors, and infrastructure are implemented using this open and public extensibility model. In theory, every developer has as much access and power as any member of the WCF team. As demonstrated throughout this book (with the exception of my security extensions), as long as you are familiar with the extensibility model, with a mere few lines of code you can inject powerful behavior and customization into your application. In practice, however, dealing with the interception mechanism requires intimate knowledge of the WCF architecture. To simplify matters, I wanted to provide an easy-to-use abstraction on top of the WCF extensibility model that would, in a way, extend the extensibility model itself, allowing for intercepting all calls to the service, both on the client and the service side, in a general manner and adding custom behavior, without having to deal with the inner workings of WCF. This appendix presents a small framework I call the generic interceptor, available with ServiceModelEx. It also demonstrates some advanced WCF programming techniques, as well as the thought process behind designing such extensions.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.205.99