wojilu框架代码分析之ActionProcessor.Process()

先不看缓存处理

internal class ActionProcessor : ProcessorBase {

private static readonly ILog logger = LogManager.GetLogger( typeof( ActionProcessor ) );


public override void Process( ProcessContext context ) {

MvcEventPublisher.Instance.BeginProcessAction( context.ctx );
if (context.ctx.utils.isSkipCurrentProcessor()) return;

MvcContext ctx = context.ctx;

ControllerBase controller = context.getController();


MethodInfo actionMethod = ctx.ActionMethodInfo; // context.getActionMethod();

// 设值模板并载入全局变量

//设置模板,取得正确的view,此时view还是初始值,里面的变量还没有复制。根据controller和actionMethod参数//

//调用getParentViewPath取得正确的view路径。
setControllerView( controller, actionMethod );

// 运行并处理post值

//此处运行对应的action,对view中的变量进行赋值,产生_actionContent
ActionRunner.runAction( ctx, controller, actionMethod, controller.utils.runAction );
String actionContent = controller.utils.getActionResult();

 

你可能感兴趣的:(process)