public async Task Refresh(IList <WidgetItem> widgets) { await Task.Run(() => { foreach (var item in widgets) { var context = _compiler.Compile(item.Code); item.Context = context.Result as IWidget; item.Context?.Run(); } }); }
private void OnCompile() { if (SelectedWidget == null) { return; } var compileCodeResult = _compilerService.Compile(SelectedWidgetCode); Messenger.Default.Send(new WidgetCompileResultMessage { CompileResult = compileCodeResult }); }