开发者

How to clear StructureMap cache?

I am using Hybri开发者_如何转开发d caching in StructureMap, however during my unit tests I want to be able to clear the cache of StructureMap so that the code will construct new objects rather than taking them from the cache.

I see no method what so ever to clear the caches objects from StructureMap. Even when I re-Initialize the configuration, it still returns me the initial objects.

Has anyone got a work around for this? I would have thought ResetDefaults would solve this, but it doesnt!


Have you tried

void IContainer::EjectAllInstancesOf<T>()
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜