I’ve the following code and I can’t fully understand what’s happen there:
Authorize auth = new Authorize(
this.google,
(DesktopConsumer consumer, out string requestToken) =>
GoogleConsumer.RequestAuthorization(
consumer,
GoogleConsumer.Applications.Contacts | GoogleConsumer.Applications.Blogger,
out requestToken));
Here’s what I know:
“Authorize” – have only 1 constructor which accept 2 arguments: (DesktopConsumer, FetchUri).
“this.google” – is a “desktopConsumer” object.
“GoogleConsumer.RequestAuthorization” returns a “Uri” object.
I can’t understand what’s the meaning of the line:
(DesktopConsumer consumer, out string requestToken) =>
in the middle.
In this case
=>creates an anonymous method/delegate using a lambda expression with the argumentsDesktopConsumer consumer, out string requestToken.