Ejemplo n.º 1
0
        public async Task <object> Any(EvaluateLinq request)
        {
            var context = ((AppHost)AppHost.Instance).LinqContext;

            foreach (var entry in request.Files.Safe())
            {
                context.VirtualFiles.WriteFile(entry.Key, entry.Value);
            }

            var pageResult = new PageResult(context.OneTimePage(request.Template));

            return(await pageResult.RenderToStringAsync());
        }
Ejemplo n.º 2
0
        public async Task <object> Any(EvaluateLinq request)
        {
            var context = ((AppHost)AppHost.Instance).LinqContext;

            foreach (var entry in request.Files.Safe())
            {
                context.VirtualFiles.WriteFile(entry.Key, entry.Value);
            }

            var page = request.Lang == "code"
                ? context.CodeSharpPage(request.Code)
                : request.Lang == "lisp"
                    ? context.LispSharpPage(request.Code)
                    : context.OneTimePage(request.Code);

            var pageResult = new PageResult(page);

            return(await pageResult.RenderToStringAsync());
        }