Esempio n. 1
0
 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();
         }
     });
 }
Esempio n. 2
0
        private void OnCompile()
        {
            if (SelectedWidget == null)
            {
                return;
            }

            var compileCodeResult = _compilerService.Compile(SelectedWidgetCode);

            Messenger.Default.Send(new WidgetCompileResultMessage {
                CompileResult = compileCodeResult
            });
        }