Esempio n. 1
0
        public static HtmlResult <HElement> HView(object _state, JsonData[] jsons, HContext context)
        {
            var state = _state.As <MonitorState>() ?? new MonitorState();

            state = Execute(jsons, state);

            var result         = ImmutableGenerator.Generate(System.IO.File.ReadAllText(context.HttpContext.Server.MapPath("~/Examples/Main.cs")));
            var originalResult = System.IO.File.ReadAllText(context.HttpContext.Server.MapPath("~/Examples/Main.g.cs"));

            var page = h.Html(
                h.Head
                (
                ),
                h.Body
                (
                    result == originalResult,
                    h.Div(DateTime.UtcNow)
                )
                );

            return(new HtmlResult <HElement>
            {
                Html = page,
                State = state,
            });
        }
Esempio n. 2
0
        public static void Execute()
        {
            var code   = File.ReadAllText(@"p:\Projects\NitroBolt.CodeGeneration\NitroBolt.CodeGeneration.Sample\ImmutableR.cs");
            var g_code = ImmutableGenerator.Generate(code);

            File.WriteAllText("q.cs", g_code);
        }