// Leave this virtual public virtual BindResult BindModel(Type type, IBindingContext context) { var binder = _binders.BinderFor(type); if (binder == null) { throw new FubuException(2200, "Could not determine an IModelBinder for input type {0}. No model binders matched on this type. The standard model binder requires a parameterless constructor for the model type. Alternatively, you could implement your own IModelBinder which can process this model type.", type.AssemblyQualifiedName); } return(executeModelBinder(type, binder, context)); }
private IModelBinder findBinder(Type type) { var binder = _binders.BinderFor(type); if (binder == null) { throw new FubuException(2200, "Could not determine an IModelBinder for input type {0}. No model binders matched on this type. The standard model binder requires a parameterless constructor for the model type. Alternatively, you could implement your own IModelBinder which can process this model type.", type.AssemblyQualifiedName); } return(binder); }