admin管理员组文章数量:1406943
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.
本文标签:
版权声明:本文标题:c# - Reversing EnableDiagnostic(IUnityContainer), aka removing a UnityContainerExtension - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745051773a2639697.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论