/// <summary> /// Run macro /// </summary> public async Task RunAsync() { if (!Ok) { return; } try { InitGlobals(); await Run(); await SwitchToWorkerThreadAsync(); Result = ResultField.GetValue(null) as string; if (string.IsNullOrEmpty(Result)) { Result = MACRO_OK; } } catch (Exception e) { ErrorException(e); } UpdateGlobals(); }
/// <summary> /// Run macro /// </summary> public async Task RunAsync() { if (!Ok) { return; } if (string.IsNullOrEmpty(CSharpMethodCode)) { return; } try { InitGlobalVars(); await Run(); await SwitchToWorkerThreadAsync(); Result = ResultField.GetValue(null) as string; } catch (Exception e) { ErrorException(e); } }