Exemple #1
0
        public unsafe LocationClient(global::Android.Content.Context p0, global::Com.Baidu.Location.LocationClientOption p1)
            : base(IntPtr.Zero, JniHandleOwnership.DoNotTransfer)
        {
            if (((global::Java.Lang.Object) this).Handle != IntPtr.Zero)
            {
                return;
            }

            try {
                JValue *__args = stackalloc JValue [2];
                __args [0] = new JValue(p0);
                __args [1] = new JValue(p1);
                if (((object)this).GetType() != typeof(LocationClient))
                {
                    SetHandle(
                        global::Android.Runtime.JNIEnv.StartCreateInstance(((object)this).GetType(), "(Landroid/content/Context;Lcom/baidu/location/LocationClientOption;)V", __args),
                        JniHandleOwnership.TransferLocalRef);
                    global::Android.Runtime.JNIEnv.FinishCreateInstance(((global::Java.Lang.Object) this).Handle, "(Landroid/content/Context;Lcom/baidu/location/LocationClientOption;)V", __args);
                    return;
                }

                if (id_ctor_Landroid_content_Context_Lcom_baidu_location_LocationClientOption_ == IntPtr.Zero)
                {
                    id_ctor_Landroid_content_Context_Lcom_baidu_location_LocationClientOption_ = JNIEnv.GetMethodID(class_ref, "<init>", "(Landroid/content/Context;Lcom/baidu/location/LocationClientOption;)V");
                }
                SetHandle(
                    global::Android.Runtime.JNIEnv.StartCreateInstance(class_ref, id_ctor_Landroid_content_Context_Lcom_baidu_location_LocationClientOption_, __args),
                    JniHandleOwnership.TransferLocalRef);
                JNIEnv.FinishCreateInstance(((global::Java.Lang.Object) this).Handle, class_ref, id_ctor_Landroid_content_Context_Lcom_baidu_location_LocationClientOption_, __args);
            } finally {
            }
        }
Exemple #2
0
        public unsafe LocationClient(global::Android.Content.Context p0, global::Com.Baidu.Location.LocationClientOption p1)
            : base(IntPtr.Zero, JniHandleOwnership.DoNotTransfer)
        {
            const string __id = "(Landroid/content/Context;Lcom/baidu/location/LocationClientOption;)V";

            if (((global::Java.Lang.Object) this).Handle != IntPtr.Zero)
            {
                return;
            }

            try {
                JniArgumentValue *__args = stackalloc JniArgumentValue [2];
                __args [0] = new JniArgumentValue((p0 == null) ? IntPtr.Zero : ((global::Java.Lang.Object)p0).Handle);
                __args [1] = new JniArgumentValue((p1 == null) ? IntPtr.Zero : ((global::Java.Lang.Object)p1).Handle);
                var __r = _members.InstanceMethods.StartCreateInstance(__id, ((object)this).GetType(), __args);
                SetHandle(__r.Handle, JniHandleOwnership.TransferLocalRef);
                _members.InstanceMethods.FinishCreateInstance(__id, this, __args);
            } finally {
            }
        }