How can you running a task at startup time when your task comes from a plugin? I have a plugin with special tasks and I want complete them before application module initializing but from a plugin in release mode. If I marking my task classes with an interface like IStartupTask then how can I completing tasks with this marker at startup time after *.Core module before *.Application module. I think it's can be done with a class registrar in PreInitialize method of Application module but i don't know how to do :(
1 Answer(s)
-
0
Hi,
I'm not sure if it works but you can try to use collection resolver to resolve all implementations of IStartupTaks, <a class="postlink" href="https://github.com/castleproject/Windsor/blob/master/docs/resolvers.md#collectionresolver">https://github.com/castleproject/Windso ... onresolver</a>.
Then, you can execute all of them in a foreach loop.