Open RemcoBlok opened 5 years ago
It appears currently the callback is run after the lifetime scope is disposed so that will need to be updated. It'll also have to be safe such that if an exception is thrown during the callback the disposal of the scope will still be executed. It's simpler how it is now, which is not to say it's not possible to change, just that it's not "reorder the statements and call it good." Back compat is also a consideration, so we'll need overloads to handle it, not replacement of the existing thing.
Great to see the addition of the constructorExceptionCallback in release 2.1.0. I need to be able to resolve my logger instance in the callback. Is it possible to change the callback signature from
Action<Exception>
toAction<IComponentContext, Exception>
?