public override IModelBinder GetBinder(HttpConfiguration configuration, Type modelType) { return(CollectionModelBinderUtil.GetGenericBinder( typeof(IDictionary <,>), typeof(Dictionary <,>), typeof(DictionaryModelBinder <,>), modelType )); }
public override IModelBinder GetBinder(HttpConfiguration configuration, Type modelType) { return(CollectionModelBinderUtil.GetGenericBinder( typeof(ICollection <>), typeof(List <>), typeof(CollectionModelBinder <>), modelType )); }
public override IModelBinder GetBinder(HttpActionContext actionContext, ModelBindingContext bindingContext) { ModelBindingHelper.ValidateBindingContext(bindingContext); if (bindingContext.ValueProvider.ContainsPrefix(bindingContext.ModelName)) { return(CollectionModelBinderUtil.GetGenericBinder(typeof(ICollection <>), typeof(List <>), typeof(CollectionModelBinder <>), bindingContext.ModelMetadata)); } else { return(null); } }