简体   繁体   中英

Google Api .NET Library OAuth2 Authentication

I am attempting some experiments using the code samples provided near the bottom of the page

Below are extracts of my VB.NET code based on the link above. Somewhere in the translation I'm missing what is going on here:

Dim auth = New OAuth2Authenticator(Of NativeApplicationClient)(provider, GetAuthorization)

The GetAuthorization method has a signature:

GetAuthorization(arg As NativeApplicationClient)

I am clearly missing something very obvious about the syntax translation between C# and VB.NET, because there is no parameter supplied at the method call in the C# version on the link I supplied.

您必须指定AddressOf参数以引用方法。

Dim auth = New OAuth2Authenticator(Of NativeApplicationClient)(provider, AddressOf GetAuthorization)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM