示例#1
0
            public unsafe Builder(string clientId, global::Com.Spotify.Sdk.Android.Authentication.AuthenticationResponse.Type responseType, string redirectUri)
                : base(IntPtr.Zero, JniHandleOwnership.DoNotTransfer)
            {
                const string __id = "(Ljava/lang/String;Lcom/spotify/sdk/android/authentication/AuthenticationResponse$Type;Ljava/lang/String;)V";

                if (((global::Java.Lang.Object) this).Handle != IntPtr.Zero)
                {
                    return;
                }

                IntPtr native_clientId    = JNIEnv.NewString(clientId);
                IntPtr native_redirectUri = JNIEnv.NewString(redirectUri);

                try {
                    JniArgumentValue *__args = stackalloc JniArgumentValue [3];
                    __args [0] = new JniArgumentValue(native_clientId);
                    __args [1] = new JniArgumentValue((responseType == null) ? IntPtr.Zero : ((global::Java.Lang.Object)responseType).Handle);
                    __args [2] = new JniArgumentValue(native_redirectUri);
                    var __r = _members.InstanceMethods.StartCreateInstance(__id, ((object)this).GetType(), __args);
                    SetHandle(__r.Handle, JniHandleOwnership.TransferLocalRef);
                    _members.InstanceMethods.FinishCreateInstance(__id, this, __args);
                } finally {
                    JNIEnv.DeleteLocalRef(native_clientId);
                    JNIEnv.DeleteLocalRef(native_redirectUri);
                }
            }
            public virtual unsafe global::Com.Spotify.Sdk.Android.Authentication.AuthenticationResponse.Builder SetType(global::Com.Spotify.Sdk.Android.Authentication.AuthenticationResponse.Type type)
            {
                const string __id = "setType.(Lcom/spotify/sdk/android/authentication/AuthenticationResponse$Type;)Lcom/spotify/sdk/android/authentication/AuthenticationResponse$Builder;";

                try {
                    JniArgumentValue *__args = stackalloc JniArgumentValue [1];
                    __args [0] = new JniArgumentValue((type == null) ? IntPtr.Zero : ((global::Java.Lang.Object)type).Handle);
                    var __rm = _members.InstanceMethods.InvokeVirtualObjectMethod(__id, this, __args);
                    return(global::Java.Lang.Object.GetObject <global::Com.Spotify.Sdk.Android.Authentication.AuthenticationResponse.Builder> (__rm.Handle, JniHandleOwnership.TransferLocalRef));
                } finally {
                }
            }
            static IntPtr n_SetType_Lcom_spotify_sdk_android_authentication_AuthenticationResponse_Type_(IntPtr jnienv, IntPtr native__this, IntPtr native_type)
            {
                global::Com.Spotify.Sdk.Android.Authentication.AuthenticationResponse.Builder __this = global::Java.Lang.Object.GetObject <global::Com.Spotify.Sdk.Android.Authentication.AuthenticationResponse.Builder> (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
                global::Com.Spotify.Sdk.Android.Authentication.AuthenticationResponse.Type    type   = global::Java.Lang.Object.GetObject <global::Com.Spotify.Sdk.Android.Authentication.AuthenticationResponse.Type> (native_type, JniHandleOwnership.DoNotTransfer);
                IntPtr __ret = JNIEnv.ToLocalJniHandle(__this.SetType(type));

                return(__ret);
            }