示例#1
0
文件: Prog.cs 项目: olympum/caffeine
 public virtual char[] foo10(char[] str)
 {
     JObject r = _foo10.CallObject(this, str);
     JCharArray array = new JCharArray (r);
     return (char[]) array.Elements;
 }
示例#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;
 }