/// <summary> /// /// </summary> /// <returns></returns> public async Task InvokeAsync() { var controllerContext = new ControllerContext(_actionContext) { ValueProviderFactories = _valueProviderFactories }; var controllerActionDescriptor = controllerContext.ActionDescriptor; var actionMethodInfo = controllerActionDescriptor.MethodInfo; var arguments = BindArguments(controllerContext); var actionInvokeInfo = new ActualActionInvokeInfo { ActionMethodInfo = actionMethodInfo, Arguments = arguments }; var key = Guid.NewGuid().ToString(); _actionInvokeInfoCache.Add(key, actionInvokeInfo); var contentResult = new ContentResult { Content = key }; await _contentResultExecutor.ExecuteAsync(_actionContext, contentResult); }
/// <summary> /// /// </summary> /// <param name="key"></param> /// <param name="actualActionInvokeInfo"></param> public void Add(string key, ActualActionInvokeInfo actualActionInvokeInfo) { lock (_cache) { _cache.Add(key, actualActionInvokeInfo); } }