コード例 #1
0
            static IntPtr n_HandleResponse_Lcom_algorithmia_client_HttpResponse_(IntPtr jnienv, IntPtr native__this, IntPtr native_p0)
            {
                global::Com.Algorithmia.Client.HttpResponseHandler.JsonDeserializeResponseHandler __this = global::Java.Lang.Object.GetObject <global::Com.Algorithmia.Client.HttpResponseHandler.JsonDeserializeResponseHandler> (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
                global::Com.Algorithmia.Client.HttpResponse p0 = global::Java.Lang.Object.GetObject <global::Com.Algorithmia.Client.HttpResponse> (native_p0, JniHandleOwnership.DoNotTransfer);
                IntPtr __ret = JNIEnv.ToLocalJniHandle(__this.HandleResponse(p0));

                return(__ret);
            }
        static IntPtr n_GetFirstHeader_Ljava_lang_String_(IntPtr jnienv, IntPtr native__this, IntPtr native_p0)
        {
            global::Com.Algorithmia.Client.HttpResponse __this = global::Java.Lang.Object.GetObject <global::Com.Algorithmia.Client.HttpResponse> (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
            string p0    = JNIEnv.GetString(native_p0, JniHandleOwnership.DoNotTransfer);
            IntPtr __ret = JNIEnv.NewString(__this.GetFirstHeader(p0));

            return(__ret);
        }
 public static unsafe void ThrowIfNotOk(global::Com.Algorithmia.Client.HttpResponse p0)
 {
     if (id_throwIfNotOk_Lcom_algorithmia_client_HttpResponse_ == IntPtr.Zero)
     {
         id_throwIfNotOk_Lcom_algorithmia_client_HttpResponse_ = JNIEnv.GetStaticMethodID(class_ref, "throwIfNotOk", "(Lcom/algorithmia/client/HttpResponse;)V");
     }
     try {
         JValue *__args = stackalloc JValue [1];
         __args [0] = new JValue(p0);
         JNIEnv.CallStaticVoidMethod(class_ref, id_throwIfNotOk_Lcom_algorithmia_client_HttpResponse_, __args);
     } finally {
     }
 }
コード例 #4
0
 protected override unsafe global::Java.Lang.Object HandleResponse(global::Com.Algorithmia.Client.HttpResponse p0)
 {
     if (id_handleResponse_Lcom_algorithmia_client_HttpResponse_ == IntPtr.Zero)
     {
         id_handleResponse_Lcom_algorithmia_client_HttpResponse_ = JNIEnv.GetMethodID(class_ref, "handleResponse", "(Lcom/algorithmia/client/HttpResponse;)Ljava/lang/Object;");
     }
     try {
         JValue *__args = stackalloc JValue [1];
         __args [0] = new JValue(p0);
         global::Java.Lang.Object __ret = (Java.Lang.Object)global::Java.Lang.Object.GetObject <global::Java.Lang.Object> (JNIEnv.CallObjectMethod(((global::Java.Lang.Object) this).Handle, id_handleResponse_Lcom_algorithmia_client_HttpResponse_, __args), JniHandleOwnership.TransferLocalRef);
         return(__ret);
     } finally {
     }
 }
 public static unsafe global::Com.Algorithmia.APIException FromHttpResponse(global::Com.Algorithmia.Client.HttpResponse p0)
 {
     if (id_fromHttpResponse_Lcom_algorithmia_client_HttpResponse_ == IntPtr.Zero)
     {
         id_fromHttpResponse_Lcom_algorithmia_client_HttpResponse_ = JNIEnv.GetStaticMethodID(class_ref, "fromHttpResponse", "(Lcom/algorithmia/client/HttpResponse;)Lcom/algorithmia/APIException;");
     }
     try {
         JValue *__args = stackalloc JValue [1];
         __args [0] = new JValue(p0);
         global::Com.Algorithmia.APIException __ret = global::Java.Lang.Object.GetObject <global::Com.Algorithmia.APIException> (JNIEnv.CallStaticObjectMethod(class_ref, id_fromHttpResponse_Lcom_algorithmia_client_HttpResponse_, __args), JniHandleOwnership.TransferLocalRef);
         return(__ret);
     } finally {
     }
 }
 public static unsafe global::GoogleGson.JsonElement ParseResponseJson(global::Com.Algorithmia.Client.HttpResponse p0)
 {
     if (id_parseResponseJson_Lcom_algorithmia_client_HttpResponse_ == IntPtr.Zero)
     {
         id_parseResponseJson_Lcom_algorithmia_client_HttpResponse_ = JNIEnv.GetStaticMethodID(class_ref, "parseResponseJson", "(Lcom/algorithmia/client/HttpResponse;)Lcom/google/gson/JsonElement;");
     }
     try {
         JValue *__args = stackalloc JValue [1];
         __args [0] = new JValue(p0);
         global::GoogleGson.JsonElement __ret = global::Java.Lang.Object.GetObject <global::GoogleGson.JsonElement> (JNIEnv.CallStaticObjectMethod(class_ref, id_parseResponseJson_Lcom_algorithmia_client_HttpResponse_, __args), JniHandleOwnership.TransferLocalRef);
         return(__ret);
     } finally {
     }
 }
 static int n_GetStatusCode(IntPtr jnienv, IntPtr native__this)
 {
     global::Com.Algorithmia.Client.HttpResponse __this = global::Java.Lang.Object.GetObject <global::Com.Algorithmia.Client.HttpResponse> (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
     return(__this.StatusCode);
 }
 static IntPtr n_GetContent(IntPtr jnienv, IntPtr native__this)
 {
     global::Com.Algorithmia.Client.HttpResponse __this = global::Java.Lang.Object.GetObject <global::Com.Algorithmia.Client.HttpResponse> (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
     return(global::Android.Runtime.InputStreamAdapter.ToLocalJniHandle(__this.Content));
 }
コード例 #9
0
 protected abstract global::Java.Lang.Object HandleResponse(global::Com.Algorithmia.Client.HttpResponse p0);