public void BindAllInAssemblyGeneric(Assembly assembly, Type type)
{
foreach (var pair in assembly.GetExportedTypes()
.Where(service => service.IsClass)
.SelectMany(service => service.GetInterfaces().Select(@interface => new KeyValuePair<Type, Type>(service, @interface)))
.Where(pair => pair.Value.IsGenericType && pair.Value.GetGenericTypeDefinition() == type))
{
Bind(pair.Value).To(pair.Key).InTransientScope();
}
}