2

What would the equivilant to to Ninject's .Get() be in Autofac?

  Type handlerType = typeof(IMessageHandler<>);
            Type[] typeArgs = { message.GetType() };
            Type constructed = handlerType.MakeGenericType(typeArgs);
            var handler = NinjectKernel.Get(constructed);

Thank you!

Steven
  • 166,672
  • 24
  • 332
  • 435
Ray Suelzer
  • 4,026
  • 5
  • 39
  • 55

1 Answers1

0

You can use:

IContainer.Resolve(Type)
MattD
  • 4,220
  • 2
  • 34
  • 44
Steven
  • 166,672
  • 24
  • 332
  • 435