Пример #1
0
        private async Task <IViewComponentResult> InvokeAsyncCore(
            [NotNull] MethodInfo method,
            [NotNull] ViewContext context)
        {
            var component = CreateComponent(context);

            var result = await ReflectedActionExecutor.ExecuteAsync(method, component, _args);

            return(CoerceToViewComponentResult(result));
        }
Пример #2
0
        protected override async Task <IActionResult> InvokeActionAsync(ActionExecutingContext actionExecutingContext)
        {
            var actionMethodInfo  = _descriptor.MethodInfo;
            var actionReturnValue = await ReflectedActionExecutor.ExecuteAsync(
                actionMethodInfo,
                ActionContext.Controller,
                actionExecutingContext.ActionArguments);

            var actionResult = CreateActionResult(
                actionMethodInfo.ReturnType,
                actionReturnValue);

            return(actionResult);
        }
Пример #3
0
        private async Task <IActionResult> InvokeActionMethod()
        {
            _cursor.SetStage(FilterStage.ActionMethod);

            var actionMethodInfo  = _descriptor.MethodInfo;
            var actionReturnValue = await ReflectedActionExecutor.ExecuteAsync(
                actionMethodInfo,
                _actionContext.Controller,
                _actionExecutingContext.ActionArguments);

            var actionResult = CreateActionResult(
                actionMethodInfo.ReturnType,
                actionReturnValue);

            return(actionResult);
        }