Structuremap 有一个内置的 IList<>
policy,它返回所有注册的类型。
有什么办法可以覆盖这种行为吗?
我想要的是:
container.Configure(
config =>
{
config.For(typeof(IList<>)).Use(
"Build list and check if there are no conflicting registrations",context =>
{
//// Do some checks and return the list if there are no conflicts
});
});