且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何确定 StructureMap 是否多次加载同一个注册表?

更新时间:2022-12-09 15:45:40

我会跑:

container.WhatDoIHave();

并检查其输出.如果您看到多个对象注册,那么您就知道有问题.

and check its output. If you see multiple registrations for object then you know you have a problem.

或者将日志代码添加到注册表中以查看其是否被多次调用.

Alternatively add logging code to the registry to see if its being called multiple times.