Implemented AOP capabilities into the handlers. I order to be able to ke...

I've used AOP with PostSharp for quite some time now, and I have integrated it with NServiceBus before, but I think that it would be a plus if NServiceBus provided some AOP capabilities out of the box. I have implemented something simple  but which I believe covers a lot of the needs. Have a look and see if it is something that would interest you... it still needs some work though.

Usage example.

    [IUseHandlerAspectsAttribute(typeof(HandlerAspects))]
    public class ActionAddedEventHandler : IHandleMessages<ActionAddedEvent>
    {
        public void Handle(ActionAddedEvent message)
        {

        }
    }



    public class HandlerAspects : IHandlerAspectsProvider
    {
        private static readonly ILog Logger = LogManager.GetLogger(typeof(ActionAddedEventHandler));


        public override void OnEntry(HandlerAspectEntryArgs args)
        {
            var logText = new StringBuilder(string.Format("Started handling message:{0} --> ", args.Message.GetType().FullName));

            foreach (var property in args.Message.GetType().GetProperties())
            {
                logText.Append(string.Format("{0}:{1} ", property.Name, property.GetValue(args.Message)));
            }
        }

        public override void OnException(HandlerAspectExceptionArgs args)
        {
            base.OnException(args);
        }

        public override void OnExit(HandlerAspectArgs args)
        {
            base.OnExit(args);
        }

        public override void OnSuccess(HandlerAspectArgs args)
        {
            base.OnSuccess(args);
        }
    }