public unsafe HelloDetails(global::Com.Spotify.Protocol.Types.Roles roles, global::Com.Spotify.Protocol.Types.Info info, string[] authmethods, string authid, global::System.Collections.Generic.IDictionary <string, string> extras)
            : base(IntPtr.Zero, JniHandleOwnership.DoNotTransfer)
        {
            const string __id = "(Lcom/spotify/protocol/types/Roles;Lcom/spotify/protocol/types/Info;[Ljava/lang/String;Ljava/lang/String;Ljava/util/Map;)V";

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

            IntPtr native_authmethods = JNIEnv.NewArray(authmethods);
            IntPtr native_authid      = JNIEnv.NewString(authid);
            IntPtr native_extras      = global::Android.Runtime.JavaDictionary <string, string> .ToLocalJniHandle(extras);

            try {
                JniArgumentValue *__args = stackalloc JniArgumentValue [5];
                __args [0] = new JniArgumentValue((roles == null) ? IntPtr.Zero : ((global::Java.Lang.Object)roles).Handle);
                __args [1] = new JniArgumentValue((info == null) ? IntPtr.Zero : ((global::Java.Lang.Object)info).Handle);
                __args [2] = new JniArgumentValue(native_authmethods);
                __args [3] = new JniArgumentValue(native_authid);
                __args [4] = new JniArgumentValue(native_extras);
                var __r = _members.InstanceMethods.StartCreateInstance(__id, ((object)this).GetType(), __args);
                SetHandle(__r.Handle, JniHandleOwnership.TransferLocalRef);
                _members.InstanceMethods.FinishCreateInstance(__id, this, __args);
            } finally {
                if (authmethods != null)
                {
                    JNIEnv.CopyArray(native_authmethods, authmethods);
                    JNIEnv.DeleteLocalRef(native_authmethods);
                }
                JNIEnv.DeleteLocalRef(native_authid);
                JNIEnv.DeleteLocalRef(native_extras);
            }
        }
Example #2
0
        public unsafe WelcomeDetails(global::Com.Spotify.Protocol.Types.Roles roles)
            : base(IntPtr.Zero, JniHandleOwnership.DoNotTransfer)
        {
            const string __id = "(Lcom/spotify/protocol/types/Roles;)V";

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

            try {
                JniArgumentValue *__args = stackalloc JniArgumentValue [1];
                __args [0] = new JniArgumentValue((roles == null) ? IntPtr.Zero : ((global::Java.Lang.Object)roles).Handle);
                var __r = _members.InstanceMethods.StartCreateInstance(__id, ((object)this).GetType(), __args);
                SetHandle(__r.Handle, JniHandleOwnership.TransferLocalRef);
                _members.InstanceMethods.FinishCreateInstance(__id, this, __args);
            } finally {
            }
        }