Пример #1
0
        public unsafe JsonRpcError(global::Com.Facebook.Stetho.Inspector.Jsonrpc.Protocol.JsonRpcError.ErrorCode p0, string p1, global::Org.Json.JSONObject p2)
            : base(IntPtr.Zero, JniHandleOwnership.DoNotTransfer)
        {
            if (((global::Java.Lang.Object) this).Handle != IntPtr.Zero)
            {
                return;
            }

            IntPtr native_p1 = JNIEnv.NewString(p1);

            try {
                JValue *__args = stackalloc JValue [3];
                __args [0] = new JValue(p0);
                __args [1] = new JValue(native_p1);
                __args [2] = new JValue(p2);
                if (GetType() != typeof(JsonRpcError))
                {
                    SetHandle(
                        global::Android.Runtime.JNIEnv.StartCreateInstance(GetType(), "(Lcom/facebook/stetho/inspector/jsonrpc/protocol/JsonRpcError$ErrorCode;Ljava/lang/String;Lorg/json/JSONObject;)V", __args),
                        JniHandleOwnership.TransferLocalRef);
                    global::Android.Runtime.JNIEnv.FinishCreateInstance(((global::Java.Lang.Object) this).Handle, "(Lcom/facebook/stetho/inspector/jsonrpc/protocol/JsonRpcError$ErrorCode;Ljava/lang/String;Lorg/json/JSONObject;)V", __args);
                    return;
                }

                if (id_ctor_Lcom_facebook_stetho_inspector_jsonrpc_protocol_JsonRpcError_ErrorCode_Ljava_lang_String_Lorg_json_JSONObject_ == IntPtr.Zero)
                {
                    id_ctor_Lcom_facebook_stetho_inspector_jsonrpc_protocol_JsonRpcError_ErrorCode_Ljava_lang_String_Lorg_json_JSONObject_ = JNIEnv.GetMethodID(class_ref, "<init>", "(Lcom/facebook/stetho/inspector/jsonrpc/protocol/JsonRpcError$ErrorCode;Ljava/lang/String;Lorg/json/JSONObject;)V");
                }
                SetHandle(
                    global::Android.Runtime.JNIEnv.StartCreateInstance(class_ref, id_ctor_Lcom_facebook_stetho_inspector_jsonrpc_protocol_JsonRpcError_ErrorCode_Ljava_lang_String_Lorg_json_JSONObject_, __args),
                    JniHandleOwnership.TransferLocalRef);
                JNIEnv.FinishCreateInstance(((global::Java.Lang.Object) this).Handle, class_ref, id_ctor_Lcom_facebook_stetho_inspector_jsonrpc_protocol_JsonRpcError_ErrorCode_Ljava_lang_String_Lorg_json_JSONObject_, __args);
            } finally {
                JNIEnv.DeleteLocalRef(native_p1);
            }
        }
Пример #2
0
            public static unsafe global::Com.Facebook.Stetho.Inspector.Jsonrpc.Protocol.JsonRpcError.ErrorCode ValueOf(string p0)
            {
                if (id_valueOf_Ljava_lang_String_ == IntPtr.Zero)
                {
                    id_valueOf_Ljava_lang_String_ = JNIEnv.GetStaticMethodID(class_ref, "valueOf", "(Ljava/lang/String;)Lcom/facebook/stetho/inspector/jsonrpc/protocol/JsonRpcError$ErrorCode;");
                }
                IntPtr native_p0 = JNIEnv.NewString(p0);

                try {
                    JValue *__args = stackalloc JValue [1];
                    __args [0] = new JValue(native_p0);
                    global::Com.Facebook.Stetho.Inspector.Jsonrpc.Protocol.JsonRpcError.ErrorCode __ret = global::Java.Lang.Object.GetObject <global::Com.Facebook.Stetho.Inspector.Jsonrpc.Protocol.JsonRpcError.ErrorCode> (JNIEnv.CallStaticObjectMethod(class_ref, id_valueOf_Ljava_lang_String_, __args), JniHandleOwnership.TransferLocalRef);
                    return(__ret);
                } finally {
                    JNIEnv.DeleteLocalRef(native_p0);
                }
            }