Esempio n. 1
0
 public void EvalHttpSend(RCRunner runner, RCClosure closure, RCLong left, RCByte right)
 {
     try
     {
         // Maybe we should send multiple here?
         DoHttpSend(runner, closure, left, right.ToArray());
     }
     catch (Exception)
     {
         throw;
     }
 }
Esempio n. 2
0
 public void EvalSavebin(RCRunner runner, RCClosure closure, RCString left, RCByte right)
 {
     // BRIAN READ THIS WHEN YOU GET BACK HERE.
     // Should not be doing sync io like this.
     // The least I can do is use a thread pool thread.
     try
     {
         File.WriteAllBytes(left[0], right.ToArray());
     }
     catch (UnauthorizedAccessException ex)
     {
         throw new RCException(closure, RCErrors.Access, ex.Message);
     }
     catch (FileNotFoundException ex)
     {
         throw new RCException(closure, RCErrors.File, ex.Message);
     }
     RCSystem.Log.Record(closure, "save", Interlocked.Increment(ref _handle), left[0], right);
     runner.Yield(closure, new RCString(left[0]));
 }
Esempio n. 3
0
        public void EvalAscii(RCRunner runner, RCClosure closure, RCByte right)
        {
            string result = Encoding.ASCII.GetString(right.ToArray());

            runner.Yield(closure, new RCString(result));
        }