Beispiel #1
0
 public virtual int[] fooC()
 {
     JObject r = _fooC.CallObject (this);
     JIntArray array = new JIntArray (r);
     return (int[]) array.Elements;
 }
Beispiel #2
0
 static JObject Convert(object arg)
 {
     JObject array = null;
     if (arg is System.Boolean[]) {
         array = new JBooleanArray ((bool[]) arg);
     } else if (arg is System.Byte[]) {
         array = new JByteArray ((byte[]) arg);
     } else if (arg is System.Char[]) {
         array = new JCharArray ((char[]) arg);
     } else if (arg is System.Int16[]) {
         array = new JShortArray ((short[]) arg);
     } else if (arg is System.Int32[]) {
         array = new JIntArray ((int[]) arg);
     } else if (arg is System.Int64[]) {
         array = new JLongArray ((long[]) arg);
     } else if (arg is System.Single[]) {
         array = new JFloatArray ((float[]) arg);
     } else if (arg is System.Double[]) {
         array = new JDoubleArray ((double[]) arg);
     } else if (arg is JObjectArray) {
         array = (JObjectArray) arg;
     } else if (arg is JObject) {
         return (JObject) arg;
     } else {
         // TODO custom exception
         throw new ApplicationException (
         "Type not supported: " + arg.GetType ());
     }
     return array;
 }