Пример #1
0
        public static unsafe byte[] Marshall(global::Android.OS.IParcelable parcelable)
        {
            const string __id = "marshall.(Landroid/os/Parcelable;)[B";

            try {
                JniArgumentValue *__args = stackalloc JniArgumentValue [1];
                __args [0] = new JniArgumentValue((parcelable == null) ? IntPtr.Zero : ((global::Java.Lang.Object)parcelable).Handle);
                var __rm = _members.StaticMethods.InvokeObjectMethod(__id, __args);
                return((byte[])JNIEnv.GetArray(__rm.Handle, JniHandleOwnership.TransferLocalRef, typeof(byte)));
            } finally {
                global::System.GC.KeepAlive(parcelable);
            }
        }
 public static unsafe void WriteParcelable(global::Android.OS.Parcel parcel, global::Android.OS.IParcelable parcelable)
 {
     if (id_writeParcelable_Landroid_os_Parcel_Landroid_os_Parcelable_ == IntPtr.Zero)
     {
         id_writeParcelable_Landroid_os_Parcel_Landroid_os_Parcelable_ = JNIEnv.GetStaticMethodID(class_ref, "writeParcelable", "(Landroid/os/Parcel;Landroid/os/Parcelable;)V");
     }
     try {
         JValue *__args = stackalloc JValue [2];
         __args [0] = new JValue(parcel);
         __args [1] = new JValue(parcelable);
         JNIEnv.CallStaticVoidMethod(class_ref, id_writeParcelable_Landroid_os_Parcel_Landroid_os_Parcelable_, __args);
     } finally {
     }
 }