You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are migrating a lot of legacy code from ASPNET 472 to Net6+
There was a big problem in Legacy framework where if you left the request thread you lost HttpContext and subsequently lost request lifetime objects in IoC containers as containers like autofac, simpleinjector, etc used to rely on HttpContext for this.
This cause a lot of code to be written in a blocking way to avoid problems.
In dotnet core this was solved, so as we are migrating code to new system we want to auto the fixing of the blocking code into correct aync/await.
There's several patterns we are finding in the old code so this may get quite large.
Lastly it maybe be justifiable to break this into a separate library/package for "Legacy Migration Helpers" as its not really needed for new code. We have options.
Examples
Here is 4 examples that we want to check for and refactor
Feature request
Type
Problem we are solving?
We are migrating a lot of legacy code from ASPNET 472 to Net6+
There was a big problem in Legacy framework where if you left the request thread you lost HttpContext and subsequently lost request lifetime objects in IoC containers as containers like autofac, simpleinjector, etc used to rely on HttpContext for this.
This cause a lot of code to be written in a blocking way to avoid problems.
In dotnet core this was solved, so as we are migrating code to new system we want to auto the fixing of the blocking code into correct aync/await.
There's several patterns we are finding in the old code so this may get quite large.
Lastly it maybe be justifiable to break this into a separate library/package for "Legacy Migration Helpers" as its not really needed for new code. We have options.
Examples
Here is 4 examples that we want to check for and refactor
In each example we would remove the
.Result
then add aawait
, then change the method to addasync
and wrap the return parameter inTask<{param}>
The text was updated successfully, but these errors were encountered: