I'm getting this error:
StructureMap Exception Code: 202
No Default Instance defined for PluginFamily
My setup looks like:
Console.WriteLine("Structure Map");
SetupSM sm = new SetupSM();
sm.Setup();
ISomeThing someThing = ObjectFactory.GetInstance<ISomeThing>();
Console.WriteLine("something.HowManyTHings: " + someThing.HowManyThings("asdf"));
public class SetupSM
{
public void Setup()
{
var c1 = new Container(config =>
{
config.Scan(scan =>
{
scan.TheCallingAssembly();
scan.WithDefaultConventions();
});
});
var c2 = new Container(x =>
{
x.For<ISomeThing>().Use<SomeThingOne>();
});
}
}
This is my first try at using structure map, what am I missing? It seems the guide on their main website is very old using the old syntax etc.