Example #1
0
 public override object this[object i] {
     set { }
     get {
         object[]   ia = (object[])i;
         Variable[] va = new Variable[ia.Length];
         var        cb = Downcaller.upcall_cb.Fetch();
         for (int ix = 0; ix < ia.Length; ix++)
         {
             va[ix] = Downcaller.DCResult(cb.mo.setting, ia[ix]);
         }
         try {
             Variable vr = Builtins.InvokeSub(cb, va);
             return(Downcaller.DCArg(vr));
         } catch (Exception ex) {
             return(new Exception(ex.ToString()));
         }
     }
 }
Example #2
0
 public override object this[object i] {
     set { }
     get {
         object[]   ia = (object[])i;
         Variable[] va = new Variable[ia.Length];
         for (int ix = 0; ix < ia.Length; ix++)
         {
             va[ix] = Downcaller.DCResult(ia[ix]);
         }
         try {
             Variable vr = Kernel.RunInferior(
                 Downcaller.upcall_cb.Fetch().Invoke(
                     Kernel.GetInferiorRoot(), va, null));
             return(Downcaller.DCArg(vr));
         } catch (Exception ex) {
             return(new Exception(ex.ToString()));
         }
     }
 }