Skip to content

Instantly share code, notes, and snippets.

@hyrmn
Created February 12, 2014 21:51
Show Gist options
  • Select an option

  • Save hyrmn/8965246 to your computer and use it in GitHub Desktop.

Select an option

Save hyrmn/8965246 to your computer and use it in GitHub Desktop.
var bus = BusSetup.StartWith<Conservative>()
.Apply<IoCSupport>(s => s.SetAdapter(new StructureMapAdapter())
.SetHandlerInterface(typeof(IHandleMessage<>)))
.Construct();
public class StructureMapAdapter : IocAdapter
{
public IEnumerable<object> GetAllInstances(Type desiredType)
{
return ObjectFactory.GetAllInstances(desiredType).Cast<object>();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment