コード例 #1
0
ファイル: Global.asax.cs プロジェクト: a864610877/src
        private static void registerModelBinders()
        {
            ModelBinderDictionary binders = System.Web.Mvc.ModelBinders.Binders;

            binders[typeof(SearchCriteria)] = new SearchCriteriaModelBinder();

            //TODO: (erikpo) Once we have the plugin model completed, load up all available model binders here instead of hardcoding them.
        }
コード例 #2
0
 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();
 }
コード例 #3
0
        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.
        }
コード例 #4
0
 public void RegisterModelBinders(ModelBinderDictionary modelBinders)
 {
     modelBinders[typeof(SearchCriteria)] = new SearchCriteriaModelBinder();
 }