We’re starting a new Silverlight project on Caliburn.Micro. We need to log every user interaction through Google Analytics. Is there any way to have a bit of code executed every time any ActionMessage is sent?
We’re starting a new Silverlight project on Caliburn.Micro. We need to log every user
Share
Fortunately, this is quite easy. Replace ActionMessage.InvokeAction with your own method which does logging and then calls the original. You will want to do this in the Bootstrapper’s Configure override. Your code would look something like this:
That’s all there is to it. From the context variable you can get the MethodInfo, the Taget view model, the View, the EventArgs and the Source element that triggered the invocation.