示例#1
0
        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();
        }
示例#2
0
 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;
     }
 }
示例#3
0
            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);
            }