예제 #1
0
        public unsafe NetworkInfo(global::Com.Alibaba.Sdk.Android.Push.Common.Util.Support.NetworkInfo.NetworkSP p0, global::Com.Alibaba.Sdk.Android.Push.Common.Util.Support.NetworkInfo.NetworkType 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(NetworkInfo))
                {
                    SetHandle(
                        global::Android.Runtime.JNIEnv.StartCreateInstance(((object)this).GetType(), "(Lcom/alibaba/sdk/android/push/common/util/support/NetworkInfo$NetworkSP;Lcom/alibaba/sdk/android/push/common/util/support/NetworkInfo$NetworkType;)V", __args),
                        JniHandleOwnership.TransferLocalRef);
                    global::Android.Runtime.JNIEnv.FinishCreateInstance(((global::Java.Lang.Object) this).Handle, "(Lcom/alibaba/sdk/android/push/common/util/support/NetworkInfo$NetworkSP;Lcom/alibaba/sdk/android/push/common/util/support/NetworkInfo$NetworkType;)V", __args);
                    return;
                }

                if (id_ctor_Lcom_alibaba_sdk_android_push_common_util_support_NetworkInfo_NetworkSP_Lcom_alibaba_sdk_android_push_common_util_support_NetworkInfo_NetworkType_ == IntPtr.Zero)
                {
                    id_ctor_Lcom_alibaba_sdk_android_push_common_util_support_NetworkInfo_NetworkSP_Lcom_alibaba_sdk_android_push_common_util_support_NetworkInfo_NetworkType_ = JNIEnv.GetMethodID(class_ref, "<init>", "(Lcom/alibaba/sdk/android/push/common/util/support/NetworkInfo$NetworkSP;Lcom/alibaba/sdk/android/push/common/util/support/NetworkInfo$NetworkType;)V");
                }
                SetHandle(
                    global::Android.Runtime.JNIEnv.StartCreateInstance(class_ref, id_ctor_Lcom_alibaba_sdk_android_push_common_util_support_NetworkInfo_NetworkSP_Lcom_alibaba_sdk_android_push_common_util_support_NetworkInfo_NetworkType_, __args),
                    JniHandleOwnership.TransferLocalRef);
                JNIEnv.FinishCreateInstance(((global::Java.Lang.Object) this).Handle, class_ref, id_ctor_Lcom_alibaba_sdk_android_push_common_util_support_NetworkInfo_NetworkSP_Lcom_alibaba_sdk_android_push_common_util_support_NetworkInfo_NetworkType_, __args);
            } finally {
            }
        }
예제 #2
0
            public static unsafe global::Com.Alibaba.Sdk.Android.Push.Common.Util.Support.NetworkInfo.NetworkSP 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/alibaba/sdk/android/push/common/util/support/NetworkInfo$NetworkSP;");
                }
                IntPtr native_p0 = JNIEnv.NewString(p0);

                try {
                    JValue *__args = stackalloc JValue [1];
                    __args [0] = new JValue(native_p0);
                    global::Com.Alibaba.Sdk.Android.Push.Common.Util.Support.NetworkInfo.NetworkSP __ret = global::Java.Lang.Object.GetObject <global::Com.Alibaba.Sdk.Android.Push.Common.Util.Support.NetworkInfo.NetworkSP> (JNIEnv.CallStaticObjectMethod(class_ref, id_valueOf_Ljava_lang_String_, __args), JniHandleOwnership.TransferLocalRef);
                    return(__ret);
                } finally {
                    JNIEnv.DeleteLocalRef(native_p0);
                }
            }
 public static unsafe global::Com.Alibaba.Sdk.Android.Push.Common.Util.Support.NetworkInfo.NetworkSP GetNetworkSP(global::Android.Content.Context p0)
 {
     if (id_getNetworkSP_Landroid_content_Context_ == IntPtr.Zero)
     {
         id_getNetworkSP_Landroid_content_Context_ = JNIEnv.GetStaticMethodID(class_ref, "getNetworkSP", "(Landroid/content/Context;)Lcom/alibaba/sdk/android/push/common/util/support/NetworkInfo$NetworkSP;");
     }
     try {
         JValue *__args = stackalloc JValue [1];
         __args [0] = new JValue(p0);
         global::Com.Alibaba.Sdk.Android.Push.Common.Util.Support.NetworkInfo.NetworkSP __ret = global::Java.Lang.Object.GetObject <global::Com.Alibaba.Sdk.Android.Push.Common.Util.Support.NetworkInfo.NetworkSP> (JNIEnv.CallStaticObjectMethod(class_ref, id_getNetworkSP_Landroid_content_Context_, __args), JniHandleOwnership.TransferLocalRef);
         return(__ret);
     } finally {
     }
 }