c# - Reversing EnableDiagnostic(IUnityContainer), aka removing a UnityContainerExtension - Stack Overflow

in my bootstrapping i enable unity debugging throughUnity.DiagnosticExtensions.EnableDiagnostic(conta

in my bootstrapping i enable unity debugging through Unity.DiagnosticExtensions.EnableDiagnostic(container as UnityContainer);
which basically just calls container.AddExtension(new Diagnostic()).

because of an unexpected unity behaviour i cannot leave it enabled, otherwise the application fails to complete its initialization.

I found no way of "disabling" it after it's been enabled.
This is mainly due to the inability of removing any extension after they've been added.

Is anyone aware of the existence of an extension-rollback for the diagnostic?
Maybe gifted to us as opensource by some pious developer?

The only other solution that came to mind is to catch the exception, ignore it and then run the bootstrap again with debug. But that isn't particularly easy in my architecture.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745051773a4608430.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信