autofac/Autofac — pull request #527 by alexandrnikitin (2014-05-21 09:16:03+00:00)
Title: Fix for #484 (RegisterWebApiModelBinders has no effect in Web API 2)

Fixes #484

From the [Web API documentation](ModelBinderAttribute):
>There are several ways to set a model binder. First, you can add a [ModelBinder] attribute to the parameter. ... You can also add a [ModelBinder] attribute to the type. Web API will use the specified model binder for all parameters of that type. ... Finally, you can add a model-binder provider to the HttpConfiguration.

I've added assemblies scan feature that looks for ```ModelBinderAttribute``` and registers found types with metadata. One slippery moment is that it uses assemblies from ```params Assembly[] modelBinderAssemblies``` argument so user has to pass not only assemblies having model binders but also assemblies where model binders ties to models.