Topics: Troubleshooting
Apr 18, 2011 at 3:41 PM

Can anyone shed light on how the InitializerDelegate of ResourceLocker is fired?

I was digging round the plugin architecture and tried creating the necessary factories and objects required by the Enterpriselibrary.ObjectBuilder and all was fine and dandy until it came to getting resourcelocker to fire the delegate passed in... My class was basically a copy of the LoginProvider/Facade

private static ResourceLocker<Resources> _resourceLocker = new ResourceLocker<Resources>(new Resources(), Resources.DoInitializeResources);

I understand what its doing just not how to get the new plugins initialize method to fire (i assume I have to add something to one of the StartUpHandlerConfig.xml files or something...


Apr 21, 2011 at 10:34 PM

Hi, sorry for the late answer, just stumbled upon this question.

It's called when you fist time call get method on property _resourceLocker.Resources

If you want some code to be executed on system startup, you can use [ApplicationStartup] attribute