The documentation says the Ninject metadata model isn't rich enough to get the types bound to an interface.
I believe using the Bind ToMethod call you can get what you need.Change the LoadFrom to take a context instead of a kernel which will be passed in from the ToMethod call in Ninject.Then the FindTypes can be changed tostatic IList<Type> FindTypes<T>(IContext kernel, Func<Type, bool> filter){return context.Kernel.GetBindings(typeof(IConsumer)).Select(b => b.GetProvider(context).Type).Where(filter).ToList();}--
You received this message because you are subscribed to the Google Groups "masstransit-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to masstransit-dis...@googlegroups.com.
To post to this group, send email to masstrans...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/masstransit-discuss/bc20037d-3c78-4487-ac74-9c0cfebc8c4d%40googlegroups.com?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.
If you can, get the unit tests working with the automatic registration and discovery and submit a pull request.
On Wed, May 15, 2013 at 5:59 AM, Aaron Smith <aaron...@gmail.com> wrote:
The documentation says the Ninject metadata model isn't rich enough to get the types bound to an interface.
I believe using the Bind ToMethod call you can get what you need.Change the LoadFrom to take a context instead of a kernel which will be passed in from the ToMethod call in Ninject.Then the FindTypes can be changed tostatic IList<Type> FindTypes<T>(IContext kernel, Func<Type, bool> filter){return context.Kernel.GetBindings(typeof(IConsumer)).Select(b => b.GetProvider(context).Type).Where(filter).ToList();}
--
You received this message because you are subscribed to the Google Groups "masstransit-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to masstransit-discuss+unsub...@googlegroups.com.