Skip to content

Commit

Permalink
model IUserConsentVerifierInterop correctly (#794)
Browse files Browse the repository at this point in the history
  • Loading branch information
Scottj1s authored Apr 7, 2021
1 parent 77b498e commit 7d70258
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Tests/TestComponentCSharp/TestComponentCSharp.idl
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ namespace TestComponentCSharp
[uuid(39E050C3-4E74-441A-8DC0-B81104DF949C)]
interface IUserConsentVerifierInterop
{
Windows.Foundation.IAsyncOperation<Windows.Security.Credentials.UI.UserConsentVerificationResult> RequestVerificationForWindowAsync(UInt64 appWindow, String message, GUID riid);
Object RequestVerificationForWindowAsync(UInt64 appWindow, String message, GUID riid);
}

[default_interface]
Expand Down
5 changes: 3 additions & 2 deletions src/Tests/UnitTest/TestComponentCSharp_Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

using Windows.Foundation;
using Windows.UI;
using Windows.Security.Credentials.UI;
using Windows.Storage;
using Windows.Storage.Streams;
using Microsoft.UI.Xaml;
Expand Down Expand Up @@ -1094,8 +1095,8 @@ public unsafe void TestFactoryCast()

// IInspectable-based (projected) interop interface
var interop = Windows.Security.Credentials.UI.UserConsentVerifier.As<IUserConsentVerifierInterop>();
var guid = GuidGenerator.CreateIID(typeof(Windows.Foundation.IAsyncOperation<Windows.Security.Credentials.UI.UserConsentVerificationResult>));
var operation = interop.RequestVerificationForWindowAsync(0, "message", guid);
var guid = GuidGenerator.CreateIID(typeof(IAsyncOperation<UserConsentVerificationResult>));
var operation = (IAsyncOperation<UserConsentVerificationResult>)interop.RequestVerificationForWindowAsync(0, "message", guid);
Assert.NotNull(operation);
}

Expand Down

0 comments on commit 7d70258

Please sign in to comment.