I am trying to convert a "classic" asynchronous method that uses a callback to the async / await method.
This is the code:
authClient.LoginCompleted += authClient_LoginCompleted; authClient.LoginAsync(new List<string>() { "var1", "var2" }, data); static void authClient_LoginCompleted(object sender, LoginCompletedEventArgs e) { ... }
Where " data " is UserState and authClient_LoginCompleted is the callback.
I already have the logic for the async / await methods, the problem is that the interaction on the Windows phone with Microsoft.Live uses callbacks. I am considering a solution using a semaphore so as not to change the logic. Could this be a good option?
user1845148
source share