private static IAction SwitchAction(IComponentContext ctx, Process process, Action action) { var context = new PipelineContext(ctx.Resolve<IPipelineLogger>(), process); switch (action.Name) { case "copy": return action.InTemplate ? (IAction) new ContentToFileAction(context, action) : new FileToFileAction(context, action); case "web": return new WebAction(context, action); default: context.Error("{0} action is not registered.", action.Name); return new NullAction(); } }
public ContentToFileAction(PipelineContext context, Action action) { _context = context; _action = action; }
public WebAction(PipelineContext context, Action action) { _context = context; _action = action; }