protected async override Task OnAfterRenderAsync(bool firstRender) { if (firstRender) { using (dynamic context = new EvalContext(JSRuntime)) { (context as EvalContext).Expression = () => context.ace.edit("editor").setTheme("ace/theme/monokai"); await(context as EvalContext).InvokeAsync <dynamic>(); context.Reset(); (context as EvalContext).Expression = () => context.ace.edit("editor").session.setMode("ace/mode/javascript"); await(context as EvalContext).InvokeAsync <dynamic>(); } } using (dynamic context = new EvalContext(JSRuntime)) { (context as EvalContext).Expression = () => context.ace.edit("editor").session.setValue(MinimizeFunctionCode.Code); await(context as EvalContext).InvokeAsync <dynamic>(); context.Reset(); (context as EvalContext).Expression = () => context.ClientStorage.fetchConfig("config"); var raw = await(context as EvalContext).InvokeAsync <string>(); if (raw != null) { _config = JsonSerializer.Deserialize <Jtc.Optimization.Objects.OptimizerConfiguration>(raw); } } await base.OnAfterRenderAsync(firstRender); }