コード例 #1
0
 public void ChoseModelBinder(Type modelType, IModelBinder binder)
 {
     _report.AddBindingDetail(new ModelBinderSelection {
         ModelType  = modelType,
         BinderType = binder.GetType()
     });
 }
コード例 #2
0
 protected override void record(string key, RequestDataSource source, object @object)
 {
     _report.AddBindingDetail(new ModelBindingKey()
     {
         Key    = key,
         Source = source,
         Value  = @object
     });
 }
コード例 #3
0
        public BindResult BindModel(Type type, IRequestData data)
        {
            try
            {
                _report.StartModelBinding(type);
                BindResult result = _resolver.BindModel(type, data);
                _report.EndModelBinding(result.Value);

                return(result);
            }
            catch (Exception exc)
            {
                _report.AddBindingDetail(new ModelBindingException
                {
                    StackTrace = exc.StackTrace
                });
                _report.EndModelBinding(null);
                throw;
            }
        }