public override ICommandHandler GetCommandHandler() { var parameterBinders = ParameterDescriptors .Select(parameterDescriptor => new ModelBinder(parameterDescriptor)) .ToList(); if (_invocationTarget == null) { var invocationTargetBinder = _handlerMethodInfo.IsStatic ? null : new ModelBinder(_handlerMethodInfo.DeclaringType); return(new ModelBindingCommandHandler( _handlerMethodInfo, parameterBinders, invocationTargetBinder)); } else { return(new ModelBindingCommandHandler( _handlerMethodInfo, parameterBinders, _invocationTarget)); } }
public override ICommandHandler GetCommandHandler() { var parameterBinders = ParameterDescriptors .Select(p => new ModelBinder(p)) .ToList(); return(new ModelBindingCommandHandler( _handlerDelegate, parameterBinders)); }