结构图对象工厂生命周期
几个月以来我一直在使用结构图。我总是使用 ObjectFactory.GetInstance 来获取我要使用的对象的正确实例。
实际上,我需要了解默认的 ObjectFactory 的 InstanceScope 是哪个。是ThreadLocal吗?
你知道我可以在哪里读到它吗?
i've been using structuremap since a couple of months. I always use ObjectFactory.GetInstance to take the right instance of the object i've to use.
Actually, i need to understand which is the default ObjectFactory's InstanceScope. Is it ThreadLocal?
do u know where i can read about it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
谷歌上关于“structuralmap生命周期”的第一个结果:
http://structuralmap.github.com/structuralmap/ Scoping.htm
如果您未在注册表中指定,“PerRequest”是默认生命周期
first result on google for "structuremap lifecycle":
http://structuremap.github.com/structuremap/Scoping.htm
"PerRequest" is the default lifecycle if you didnt specify one in your registry