I am creating a Prism 2.1 app in which I have implemented logging, using Log4Net in a custom logger derived from ILoggerFacade. Logging works great; I simply resolve ILoggerFacade against the IOC Container, and it returns my logger, which I send a message to in the usual manner.
Here is my problem: I want to log the application exit, and the logical way to do this seems to be to override OnExit() in App.xaml.cs. But I can't figure out how to get a reference to the Container from App.xaml.cs, so that I can resolve my logger.
Can I reference the Prism IOC Container from App.xaml.cs? If so, how? Thanks.