public unsafe Algorithm(global::Com.Algorithmia.Client.HttpClient p0, global::Com.Algorithmia.Algo.AlgorithmRef 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 (GetType() != typeof(Algorithm))
                {
                    SetHandle(
                        global::Android.Runtime.JNIEnv.StartCreateInstance(GetType(), "(Lcom/algorithmia/client/HttpClient;Lcom/algorithmia/algo/AlgorithmRef;)V", __args),
                        JniHandleOwnership.TransferLocalRef);
                    global::Android.Runtime.JNIEnv.FinishCreateInstance(((global::Java.Lang.Object) this).Handle, "(Lcom/algorithmia/client/HttpClient;Lcom/algorithmia/algo/AlgorithmRef;)V", __args);
                    return;
                }

                if (id_ctor_Lcom_algorithmia_client_HttpClient_Lcom_algorithmia_algo_AlgorithmRef_ == IntPtr.Zero)
                {
                    id_ctor_Lcom_algorithmia_client_HttpClient_Lcom_algorithmia_algo_AlgorithmRef_ = JNIEnv.GetMethodID(class_ref, "<init>", "(Lcom/algorithmia/client/HttpClient;Lcom/algorithmia/algo/AlgorithmRef;)V");
                }
                SetHandle(
                    global::Android.Runtime.JNIEnv.StartCreateInstance(class_ref, id_ctor_Lcom_algorithmia_client_HttpClient_Lcom_algorithmia_algo_AlgorithmRef_, __args),
                    JniHandleOwnership.TransferLocalRef);
                JNIEnv.FinishCreateInstance(((global::Java.Lang.Object) this).Handle, class_ref, id_ctor_Lcom_algorithmia_client_HttpClient_Lcom_algorithmia_algo_AlgorithmRef_, __args);
            } finally {
            }
        }
        public unsafe Algorithm(global::Com.Algorithmia.Client.HttpClient p0, global::Com.Algorithmia.Algo.AlgorithmRef p1, global::System.Collections.Generic.IDictionary <string, string> p2)
            : base(IntPtr.Zero, JniHandleOwnership.DoNotTransfer)
        {
            if (((global::Java.Lang.Object) this).Handle != IntPtr.Zero)
            {
                return;
            }

            IntPtr native_p2 = global::Android.Runtime.JavaDictionary <string, string> .ToLocalJniHandle(p2);

            try {
                JValue *__args = stackalloc JValue [3];
                __args [0] = new JValue(p0);
                __args [1] = new JValue(p1);
                __args [2] = new JValue(native_p2);
                if (GetType() != typeof(Algorithm))
                {
                    SetHandle(
                        global::Android.Runtime.JNIEnv.StartCreateInstance(GetType(), "(Lcom/algorithmia/client/HttpClient;Lcom/algorithmia/algo/AlgorithmRef;Ljava/util/Map;)V", __args),
                        JniHandleOwnership.TransferLocalRef);
                    global::Android.Runtime.JNIEnv.FinishCreateInstance(((global::Java.Lang.Object) this).Handle, "(Lcom/algorithmia/client/HttpClient;Lcom/algorithmia/algo/AlgorithmRef;Ljava/util/Map;)V", __args);
                    return;
                }

                if (id_ctor_Lcom_algorithmia_client_HttpClient_Lcom_algorithmia_algo_AlgorithmRef_Ljava_util_Map_ == IntPtr.Zero)
                {
                    id_ctor_Lcom_algorithmia_client_HttpClient_Lcom_algorithmia_algo_AlgorithmRef_Ljava_util_Map_ = JNIEnv.GetMethodID(class_ref, "<init>", "(Lcom/algorithmia/client/HttpClient;Lcom/algorithmia/algo/AlgorithmRef;Ljava/util/Map;)V");
                }
                SetHandle(
                    global::Android.Runtime.JNIEnv.StartCreateInstance(class_ref, id_ctor_Lcom_algorithmia_client_HttpClient_Lcom_algorithmia_algo_AlgorithmRef_Ljava_util_Map_, __args),
                    JniHandleOwnership.TransferLocalRef);
                JNIEnv.FinishCreateInstance(((global::Java.Lang.Object) this).Handle, class_ref, id_ctor_Lcom_algorithmia_client_HttpClient_Lcom_algorithmia_algo_AlgorithmRef_Ljava_util_Map_, __args);
            } finally {
                JNIEnv.DeleteLocalRef(native_p2);
            }
        }
Exemple #3
0
 static IntPtr n_GetUrl(IntPtr jnienv, IntPtr native__this)
 {
     global::Com.Algorithmia.Algo.AlgorithmRef __this = global::Java.Lang.Object.GetObject <global::Com.Algorithmia.Algo.AlgorithmRef> (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
     return(JNIEnv.NewString(__this.Url));
 }