public unsafe DeviceCodeFlowCommand(global::Com.Microsoft.Identity.Common.Internal.Commands.Parameters.DeviceCodeFlowCommandParameters parameters, global::Com.Microsoft.Identity.Common.Internal.Controllers.BaseController controller, global::Com.Microsoft.Identity.Common.Internal.Commands.IDeviceCodeFlowCommandCallback @callback, string publicApiId) : base(IntPtr.Zero, JniHandleOwnership.DoNotTransfer)
        {
            const string __id = "(Lcom/microsoft/identity/common/internal/commands/parameters/DeviceCodeFlowCommandParameters;Lcom/microsoft/identity/common/internal/controllers/BaseController;Lcom/microsoft/identity/common/internal/commands/DeviceCodeFlowCommandCallback;Ljava/lang/String;)V";

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

            IntPtr native_publicApiId = JNIEnv.NewString(publicApiId);

            try {
                JniArgumentValue *__args = stackalloc JniArgumentValue [4];
                __args [0] = new JniArgumentValue((parameters == null) ? IntPtr.Zero : ((global::Java.Lang.Object)parameters).Handle);
                __args [1] = new JniArgumentValue((controller == null) ? IntPtr.Zero : ((global::Java.Lang.Object)controller).Handle);
                __args [2] = new JniArgumentValue((@callback == null) ? IntPtr.Zero : ((global::Java.Lang.Object)@callback).Handle);
                __args [3] = new JniArgumentValue(native_publicApiId);
                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_publicApiId);
                global::System.GC.KeepAlive(parameters);
                global::System.GC.KeepAlive(controller);
                global::System.GC.KeepAlive(@callback);
            }
        }
コード例 #2
0
        public override unsafe global::Com.Microsoft.Identity.Common.Internal.Result.AcquireTokenResult AcquireDeviceCodeFlowToken(global::Com.Microsoft.Identity.Common.Internal.Providers.Oauth2.AuthorizationResult authorizationResult, global::Com.Microsoft.Identity.Common.Internal.Commands.Parameters.DeviceCodeFlowCommandParameters parameters)
        {
            const string __id = "acquireDeviceCodeFlowToken.(Lcom/microsoft/identity/common/internal/providers/oauth2/AuthorizationResult;Lcom/microsoft/identity/common/internal/commands/parameters/DeviceCodeFlowCommandParameters;)Lcom/microsoft/identity/common/internal/result/AcquireTokenResult;";

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