public virtual unsafe void AcquireTokenSilentAsync(string[] scopes, global::Com.Microsoft.Identity.Client.IAccount account, string authority, global::Com.Microsoft.Identity.Client.ISilentAuthenticationCallback @callback)
        {
            const string __id             = "acquireTokenSilentAsync.([Ljava/lang/String;Lcom/microsoft/identity/client/IAccount;Ljava/lang/String;Lcom/microsoft/identity/client/SilentAuthenticationCallback;)V";
            IntPtr       native_scopes    = JNIEnv.NewArray(scopes);
            IntPtr       native_authority = JNIEnv.NewString(authority);

            try {
                JniArgumentValue *__args = stackalloc JniArgumentValue [4];
                __args [0] = new JniArgumentValue(native_scopes);
                __args [1] = new JniArgumentValue((account == null) ? IntPtr.Zero : ((global::Java.Lang.Object)account).Handle);
                __args [2] = new JniArgumentValue(native_authority);
                __args [3] = new JniArgumentValue((@callback == null) ? IntPtr.Zero : ((global::Java.Lang.Object)@callback).Handle);
                _members.InstanceMethods.InvokeVirtualVoidMethod(__id, this, __args);
            } finally {
                if (scopes != null)
                {
                    JNIEnv.CopyArray(native_scopes, scopes);
                    JNIEnv.DeleteLocalRef(native_scopes);
                }
                JNIEnv.DeleteLocalRef(native_authority);
                global::System.GC.KeepAlive(scopes);
                global::System.GC.KeepAlive(account);
                global::System.GC.KeepAlive(@callback);
            }
        }
예제 #2
0
            public virtual unsafe global::Com.Microsoft.Identity.Client.AcquireTokenSilentParameters.Builder WithCallback(global::Com.Microsoft.Identity.Client.ISilentAuthenticationCallback authenticationCallback)
            {
                const string __id = "withCallback.(Lcom/microsoft/identity/client/SilentAuthenticationCallback;)Lcom/microsoft/identity/client/AcquireTokenSilentParameters$Builder;";

                try {
                    JniArgumentValue *__args = stackalloc JniArgumentValue [1];
                    __args [0] = new JniArgumentValue((authenticationCallback == null) ? IntPtr.Zero : ((global::Java.Lang.Object)authenticationCallback).Handle);
                    var __rm = _members.InstanceMethods.InvokeVirtualObjectMethod(__id, this, __args);
                    return(global::Java.Lang.Object.GetObject <global::Com.Microsoft.Identity.Client.AcquireTokenSilentParameters.Builder> (__rm.Handle, JniHandleOwnership.TransferLocalRef));
                } finally {
                    global::System.GC.KeepAlive(authenticationCallback);
                }
            }