Replacement of APM usage (Begin/EndGetResponse, etc.) with TAP (GetResponseAsync) and async/await #25

Merged
merged 2 commits into from Sep 7, 2013

Conversation

Projects
None yet
2 participants
@semihokur
Contributor

semihokur commented Sep 7, 2013

As part of a research project at the University of Illinois at Urbana-Champaign, we're developing a refactoring tool that replaces instances of the APM pattern with corresponding TAP method calls and the async/await keywords. I've applied it to this project.

This pull request replaces those existing calls to APM Begin/End* methods with functionally equivalent TAP constructs and the async/await keywords. Are you interested in merging this pull request? If not, please let me know why, and I'll try and improve the pull request with your comments in mind.

Thanks for your time.

@mbmccormick

This comment has been minimized.

Show comment
Hide comment
@mbmccormick

mbmccormick Sep 7, 2013

Owner

I'm having trouble building the solution after these changes. I receive the following errors and can't seem to figure out how to resolve them:

Error   9   'System.Net.HttpWebRequest' does not contain a definition for 'GetResponseAsync' and no extension method 'GetResponseAsync' accepting a first argument of type 'System.Net.HttpWebRequest' could be found (are you missing a using directive or an assembly reference?) C:\Users\Matt\Documents\Development\HackerNews\HackerNews.API\ServiceClient.cs  42  42  HackerNews.API
Error   10  'System.Net.HttpWebRequest' does not contain a definition for 'GetResponseAsync' and no extension method 'GetResponseAsync' accepting a first argument of type 'System.Net.HttpWebRequest' could be found (are you missing a using directive or an assembly reference?) C:\Users\Matt\Documents\Development\HackerNews\HackerNews.API\ServiceClient.cs  78  42  HackerNews.API
Error   11  'System.Net.HttpWebRequest' does not contain a definition for 'GetResponseAsync' and no extension method 'GetResponseAsync' accepting a first argument of type 'System.Net.HttpWebRequest' could be found (are you missing a using directive or an assembly reference?) C:\Users\Matt\Documents\Development\HackerNews\HackerNews.API\ServiceClient.cs  114 42  HackerNews.API
Error   12  'System.Net.HttpWebRequest' does not contain a definition for 'GetResponseAsync' and no extension method 'GetResponseAsync' accepting a first argument of type 'System.Net.HttpWebRequest' could be found (are you missing a using directive or an assembly reference?) C:\Users\Matt\Documents\Development\HackerNews\HackerNews.API\ServiceClient.cs  150 42  HackerNews.API

Are you sure that Windows Phone supports the GetResponseAsync method? Were you able to build successfully?

Owner

mbmccormick commented Sep 7, 2013

I'm having trouble building the solution after these changes. I receive the following errors and can't seem to figure out how to resolve them:

Error   9   'System.Net.HttpWebRequest' does not contain a definition for 'GetResponseAsync' and no extension method 'GetResponseAsync' accepting a first argument of type 'System.Net.HttpWebRequest' could be found (are you missing a using directive or an assembly reference?) C:\Users\Matt\Documents\Development\HackerNews\HackerNews.API\ServiceClient.cs  42  42  HackerNews.API
Error   10  'System.Net.HttpWebRequest' does not contain a definition for 'GetResponseAsync' and no extension method 'GetResponseAsync' accepting a first argument of type 'System.Net.HttpWebRequest' could be found (are you missing a using directive or an assembly reference?) C:\Users\Matt\Documents\Development\HackerNews\HackerNews.API\ServiceClient.cs  78  42  HackerNews.API
Error   11  'System.Net.HttpWebRequest' does not contain a definition for 'GetResponseAsync' and no extension method 'GetResponseAsync' accepting a first argument of type 'System.Net.HttpWebRequest' could be found (are you missing a using directive or an assembly reference?) C:\Users\Matt\Documents\Development\HackerNews\HackerNews.API\ServiceClient.cs  114 42  HackerNews.API
Error   12  'System.Net.HttpWebRequest' does not contain a definition for 'GetResponseAsync' and no extension method 'GetResponseAsync' accepting a first argument of type 'System.Net.HttpWebRequest' could be found (are you missing a using directive or an assembly reference?) C:\Users\Matt\Documents\Development\HackerNews\HackerNews.API\ServiceClient.cs  150 42  HackerNews.API

Are you sure that Windows Phone supports the GetResponseAsync method? Were you able to build successfully?

@semihokur

This comment has been minimized.

Show comment
Hide comment
@semihokur

semihokur Sep 7, 2013

Contributor

It was compiled successfully. I specifically added a nuget dependency. Did you make package restore?

The reason of the errors are that it could not find that dependency and could not resolve the symbol

Contributor

semihokur commented Sep 7, 2013

It was compiled successfully. I specifically added a nuget dependency. Did you make package restore?

The reason of the errors are that it could not find that dependency and could not resolve the symbol

@mbmccormick mbmccormick merged commit 0e42d45 into mbmccormick:master Sep 7, 2013

@mbmccormick

This comment has been minimized.

Show comment
Hide comment
@mbmccormick

mbmccormick Sep 7, 2013

Owner

Looks like it was a package restore issue, working great now! Thanks!

Owner

mbmccormick commented Sep 7, 2013

Looks like it was a package restore issue, working great now! Thanks!

@semihokur

This comment has been minimized.

Show comment
Hide comment
@semihokur

semihokur Sep 7, 2013

Contributor

Great!

Contributor

semihokur commented Sep 7, 2013

Great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment