public virtual unsafe void AddHandler(global::Com.Facebook.Stetho.Server.ProtocolDetectingSocketHandler.IMagicMatcher p0, global::Com.Facebook.Stetho.Server.ISocketLikeHandler p1)
        {
            if (id_addHandler_Lcom_facebook_stetho_server_ProtocolDetectingSocketHandler_MagicMatcher_Lcom_facebook_stetho_server_SocketLikeHandler_ == IntPtr.Zero)
            {
                id_addHandler_Lcom_facebook_stetho_server_ProtocolDetectingSocketHandler_MagicMatcher_Lcom_facebook_stetho_server_SocketLikeHandler_ = JNIEnv.GetMethodID(class_ref, "addHandler", "(Lcom/facebook/stetho/server/ProtocolDetectingSocketHandler$MagicMatcher;Lcom/facebook/stetho/server/SocketLikeHandler;)V");
            }
            try {
                JValue *__args = stackalloc JValue [2];
                __args [0] = new JValue(p0);
                __args [1] = new JValue(p1);

                if (GetType() == ThresholdType)
                {
                    JNIEnv.CallVoidMethod(((global::Java.Lang.Object) this).Handle, id_addHandler_Lcom_facebook_stetho_server_ProtocolDetectingSocketHandler_MagicMatcher_Lcom_facebook_stetho_server_SocketLikeHandler_, __args);
                }
                else
                {
                    JNIEnv.CallNonvirtualVoidMethod(((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID(ThresholdClass, "addHandler", "(Lcom/facebook/stetho/server/ProtocolDetectingSocketHandler$MagicMatcher;Lcom/facebook/stetho/server/SocketLikeHandler;)V"), __args);
                }
            } finally {
            }
        }
 static void n_AddHandler_Lcom_facebook_stetho_server_ProtocolDetectingSocketHandler_MagicMatcher_Lcom_facebook_stetho_server_SocketLikeHandler_(IntPtr jnienv, IntPtr native__this, IntPtr native_p0, IntPtr native_p1)
 {
     global::Com.Facebook.Stetho.Server.ProtocolDetectingSocketHandler __this           = global::Java.Lang.Object.GetObject <global::Com.Facebook.Stetho.Server.ProtocolDetectingSocketHandler> (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
     global::Com.Facebook.Stetho.Server.ProtocolDetectingSocketHandler.IMagicMatcher p0 = (global::Com.Facebook.Stetho.Server.ProtocolDetectingSocketHandler.IMagicMatcher)global::Java.Lang.Object.GetObject <global::Com.Facebook.Stetho.Server.ProtocolDetectingSocketHandler.IMagicMatcher> (native_p0, JniHandleOwnership.DoNotTransfer);
     global::Com.Facebook.Stetho.Server.ISocketLikeHandler p1 = (global::Com.Facebook.Stetho.Server.ISocketLikeHandler)global::Java.Lang.Object.GetObject <global::Com.Facebook.Stetho.Server.ISocketLikeHandler> (native_p1, JniHandleOwnership.DoNotTransfer);
     __this.AddHandler(p0, p1);
 }
            static bool n_Matches_Ljava_io_InputStream_(IntPtr jnienv, IntPtr native__this, IntPtr native_p0)
            {
                global::Com.Facebook.Stetho.Server.ProtocolDetectingSocketHandler.IMagicMatcher __this = global::Java.Lang.Object.GetObject <global::Com.Facebook.Stetho.Server.ProtocolDetectingSocketHandler.IMagicMatcher> (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
                System.IO.Stream p0    = global::Android.Runtime.InputStreamInvoker.FromJniHandle(native_p0, JniHandleOwnership.DoNotTransfer);
                bool             __ret = __this.Matches(p0);

                return(__ret);
            }