I am looking to convert following code to StructureMap:
private Mock<MembershipProvider> MockMembership = new Mock<MembershipProvider>();
private StandardKernel GetIoCKernel()
{
var modules = new IModule[]
{
new InlineModule(
new Action<InlineModule>[]
{
m => m.Bind<MembershipProvider>()
.ToConstant(MockMembership.Object),
})
};
return new StandardKernel(modules);
}
Mainly I am looking for the equivalent of the ToConstant
method in StructureMap. Can anyone please help me?