private static void registerModelBinders() { ModelBinderDictionary binders = System.Web.Mvc.ModelBinders.Binders; binders[typeof(ArchiveData)] = new ArchiveDataModelBinder(); binders[typeof(Area)] = new AreaModelBinder(); binders[typeof(Comment)] = new CommentModelBinder(); binders[typeof(PostBase)] = new PostBaseModelBinder(); binders[typeof(Post)] = new PostModelBinder(); binders[typeof(Page)] = new PageModelBinder(); binders[typeof(SearchCriteria)] = new SearchCriteriaModelBinder(); binders[typeof(Tag)] = new TagModelBinder(); binders[typeof(UserBase)] = new UserBaseModelBinder(); binders[typeof(Site)] = new SiteModelBinder(); binders[typeof(Plugin)] = new PluginModelBinder(); binders[typeof(AreaSearchCriteria)] = new AreaSearchCriteriaModelBinder(); binders[typeof(User)] = new UserModelBinder(); //TODO: (erikpo) Once we have the plugin model completed, load up all available model binders here instead of hardcoding them. }
public void RegisterModelBinders(ModelBinderDictionary modelBinders) { modelBinders[typeof(ArchiveData)] = new ArchiveDataModelBinder(); modelBinders[typeof(Area)] = new AreaModelBinder(); modelBinders[typeof(Comment)] = new CommentModelBinder(); modelBinders[typeof(PostBase)] = new PostBaseModelBinder(); modelBinders[typeof(Post)] = new PostModelBinder(); modelBinders[typeof(Page)] = new PageModelBinder(); modelBinders[typeof(SearchCriteria)] = new SearchCriteriaModelBinder(); modelBinders[typeof(Tag)] = new TagModelBinder(); modelBinders[typeof(UserBase)] = new UserBaseModelBinder(); modelBinders[typeof(Site)] = new SiteModelBinder(); modelBinders[typeof(Plugin)] = new PluginModelBinder(); modelBinders[typeof(AreaSearchCriteria)] = new AreaSearchCriteriaModelBinder(); modelBinders[typeof(User)] = new UserModelBinder(); modelBinders[typeof(PostAddress)] = new PostAddressModelBinder(); modelBinders[typeof(FileAddress)] = new FileAddressModelBinder(); modelBinders[typeof(FileInput)] = new FileInputModelBinder(); modelBinders[typeof(FileContentInput)] = new FileContentInputModelBinder(); }