Currently I'm trying to reimplement some code code written in Castle Windsor in structuremap.
This code:
Component.For(typeof(IMongoCollection<>))
.UsingFactoryMethod(
(k, c) => MongoResolver.ResolveCollection(k, c.RequestedType)));
Does the following: When IMongoCollection is being called, resolve the concrete collection.
I tried to do this in structuremap with:
For(typeof(IMongoCollection<>)).Use("test", x =>
{
SOME MAGIC!
});
But I cant figure out what to do in the magic part.