public static IAsyncOperation <WebTokenRequestResult> RequestTokenForWindowAsync(IntPtr hWnd, WebTokenRequest request)
        {
            Guid iid = InteropHelper.GetIID <IAsyncOperation <WebTokenRequestResult> >();
            IWebAuthenticationCoreManagerInterop factory = InteropHelper.GetActivationFactory <IWebAuthenticationCoreManagerInterop>(typeof(WebAuthenticationCoreManager));

            return(factory.RequestTokenForWindowAsync(hWnd, request, ref iid));
        }
Exemplo n.º 2
0
        public static IAsyncOperation <WebTokenRequestResult> RequestTokenForWindowAsync(IntPtr hWnd, WebTokenRequest request)
        {
            IWebAuthenticationCoreManagerInterop webAuthenticationCoreManagerInterop = (IWebAuthenticationCoreManagerInterop)WindowsRuntimeMarshal.GetActivationFactory(typeof(WebAuthenticationCoreManager));
            //Guid guid = typeof(WebAuthenticationCoreManager).GetInterface("IWebAuthenticationCoreManager").GUID;
            Guid guid = typeof(IAsyncOperation <WebTokenRequestResult>).GUID;

            return(webAuthenticationCoreManagerInterop.RequestTokenForWindowAsync(hWnd, request, ref guid));
        }
Exemplo n.º 3
0
        public static IAsyncOperation <WebTokenRequestResult> RequestTokenForWindowAsync(IntPtr hWnd, WebTokenRequest request)
        {
            IWebAuthenticationCoreManagerInterop webAuthenticationCoreManagerInterop =
                WebAuthenticationCoreManager.As <IWebAuthenticationCoreManagerInterop>();
            Guid guid = WinRT.GuidGenerator.CreateIID(typeof(IAsyncOperation <WebTokenRequestResult>));

            var requestPtr = MarshalInspectable <WebTokenRequest> .FromManaged(request);

            webAuthenticationCoreManagerInterop.RequestTokenForWindowAsync(
                hWnd,
                requestPtr,
                ref guid,
                out IntPtr result);

            return(MarshalInterface <IAsyncOperation <WebTokenRequestResult> > .FromAbi(result));
        }
Exemplo n.º 4
0
        public static IAsyncInfo RequestTokenForWindowAsync(IntPtr appWindow, WebTokenRequest request)
        {
            var iid = GuidGenerator.CreateIID(typeof(IAsyncOperation <WebTokenRequestResult>));

            return((IAsyncInfo)webAuthenticationCoreManagerInterop.RequestTokenForWindowAsync(appWindow, request, iid));
        }