McKelt.com

Remembering Thoughts

 

Recent comments

Authors

Categories


Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2010

WCF Windsor Interceptor, AOP with Logging and Exception Handler Interceptor

WcfServiceExample.zip (7.57 mb)

 

The above example uses Windows Communication Foundation (WCF) Integration Facility 

The main idea here is that WCF should get the service instances from Windsor, which gives us all the usual advantages of IoC plus Windsor's interceptors capabilities. It isn't a lot of code, but it makes it much easier to work with WCF services.

The service contains 2 simple methods on the HelloWorld class.

--  SayHello -- returns a string "Hello World"
--  ThrowException -- throws an exception

Every single call to each of these is intercepted and logged.  Whilst the throw exception will always be caught by the exceptionhandler interceptor.

The first project in the solution is the WCF service, whilst the second is just a WPF client tester.
The project outlook is as follows:








Posted by Chris on Tuesday, February 03, 2009 2:29 PM
Permalink | Comments (0) | Post RSSRSS comment feed

Add comment


(Will show your Gravatar icon)

  Country flag

biuquote
  • Comment
  • Preview
Loading