public static IAsyncOperation <WebTokenRequestResult> RequestTokenWithWebAccountForWindowAsync(IntPtr hWnd, WebTokenRequest request, WebAccount webAccount) { IWebAuthenticationCoreManagerInterop webAuthenticationCoreManagerInterop = (IWebAuthenticationCoreManagerInterop)WindowsRuntimeMarshal.GetActivationFactory(typeof(WebAuthenticationCoreManager)); Guid guid = typeof(IAsyncOperation <WebTokenRequestResult>).GUID; return(webAuthenticationCoreManagerInterop.RequestTokenWithWebAccountForWindowAsync(hWnd, request, webAccount, ref guid)); }
public static IAsyncOperation <WebTokenRequestResult> RequestTokenWithWebAccountForWindowAsync(IntPtr hWnd, WebTokenRequest request, WebAccount webAccount) { Guid iid = InteropHelper.GetIID <IAsyncOperation <WebTokenRequestResult> >(); IWebAuthenticationCoreManagerInterop factory = InteropHelper.GetActivationFactory <IWebAuthenticationCoreManagerInterop>(typeof(WebAuthenticationCoreManager)); return(factory.RequestTokenWithWebAccountForWindowAsync(hWnd, request, webAccount, ref iid)); }
public static IAsyncOperation <WebTokenRequestResult> RequestTokenWithWebAccountForWindowAsync( IntPtr hWnd, WebTokenRequest request, WebAccount webAccount) { IWebAuthenticationCoreManagerInterop webAuthenticationCoreManagerInterop = WebAuthenticationCoreManager.As <IWebAuthenticationCoreManagerInterop>(); Guid guid = WinRT.GuidGenerator.CreateIID(typeof(IAsyncOperation <WebTokenRequestResult>)); var requestPtr = MarshalInspectable <WebTokenRequest> .FromManaged(request); var webAccountPtr = MarshalInspectable <WebAccount> .FromManaged(webAccount); webAuthenticationCoreManagerInterop.RequestTokenWithWebAccountForWindowAsync( hWnd, requestPtr, webAccountPtr, ref guid, out IntPtr result); return(MarshalInterface <IAsyncOperation <WebTokenRequestResult> > .FromAbi(result)); }
public static IAsyncInfo RequestTokenWithWebAccountForWindowAsync(IntPtr appWindow, WebTokenRequest request, WebAccount webAccount) { var iid = GuidGenerator.CreateIID(typeof(IAsyncOperation <WebTokenRequestResult>)); return((IAsyncInfo)webAuthenticationCoreManagerInterop.RequestTokenWithWebAccountForWindowAsync(appWindow, request, webAccount, iid)); }