public string Render(RenderContext context) { var component = ComponentService.GetComponent(setting.TagName); if (this.data != null) { context.DataContext.Push(setting.Settings); } string result = Kooboo.Sites.Render.RenderHelper.Render(component.RenderTasks, context); if (this.data != null) { context.DataContext.Pop(); } return(result); }
public EvaluatorResponse Evaluate(Node node, EvaluatorOption options) { if (node.nodeType != enumNodeType.ELEMENT) { return(null); } var element = node as Element; if (ComponentService.IsServerComponent(element.tagName)) { var response = new EvaluatorResponse(); List <IRenderTask> result = new List <IRenderTask>(); result.Add(new ServerComponentRenderTask(element)); response.ContentTask = result; response.OmitTag = true; response.StopNextEvaluator = true; return(response); } return(null); }