public void stopApp() { //string[] ar1 = CRhoFile.enumDirectory("db"); RhoRuby.callUIDestroyed(); SyncThread.getInstance().Destroy(); CAsyncHttp.Destroy(); RhoRuby.Stop(); //string[] ar2 = CRhoFile.enumDirectory("db"); //int i = 0; //net::CAsyncHttp::Destroy(); }
public static void Cancel(RubyModule /*!*/ self) { try { if (CAsyncHttp.getInstance() != null) { CAsyncHttp.getInstance().cancelRequest("*"); } } catch (Exception ex) { Exception rubyEx = self.Context.CurrentException; if (rubyEx == null) { rubyEx = RubyExceptionData.InitializeException(new RuntimeError(ex.Message.ToString()), ex.Message); } LOG.ERROR("cancel", ex); throw rubyEx; } }
public static MutableString doRequest(RubyModule /*!*/ self, [NotNull] String command, Hash args) { MutableString res = null; try { CAsyncHttp.Create(); RhoParams p = new RhoParams(args); res = CAsyncHttp.getInstance().addHttpCommand(new CAsyncHttp.HttpCommand(command, p)); } catch (Exception ex) { Exception rubyEx = self.Context.CurrentException; if (rubyEx == null) { rubyEx = RubyExceptionData.InitializeException(new RuntimeError(ex.Message.ToString()), ex.Message); } LOG.ERROR("do_request", ex); throw rubyEx; } return(res); }