Skip to content

Commit

Permalink
fixed stringly instead of strongly typo (#42403)
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel Espinosa <[email protected]>
  • Loading branch information
danespinosa and Daniel Espinosa authored Aug 30, 2024
1 parent 2ee642b commit d786dea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/csharp/roslyn-sdk/source-generators-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ With a Source Generator, the controller discovery phase of startup could instead

Source Generators can improve performance in ways that aren't limited to reflection at run time to discover types as well. Some scenarios involve calling the MSBuild C# task (called CSC) multiple times so they can inspect data from a compilation. As you might imagine, calling the compiler more than once affects the total time it takes to build your app. We're investigating how Source Generators can be used to obviate the need for juggling MSBuild tasks like this, since Source generators don't just offer some performance benefits, but also allows tools to operate at the right level of abstraction.

Another capability Source Generators can offer is obviating the use of some "stringly typed" APIs, such as how ASP.NET Core routing between controllers and razor pages work. With a Source Generator, routing can be strongly typed with the necessary strings being generated as a compile-time detail. This would reduce the number of times a mistyped string literal leads to a request not hitting the correct controller.
Another capability Source Generators can offer is obviating the use of some "strongly typed" APIs, such as how ASP.NET Core routing between controllers and razor pages work. With a Source Generator, routing can be strongly typed with the necessary strings being generated as a compile-time detail. This would reduce the number of times a mistyped string literal leads to a request not hitting the correct controller.

## Get started with source generators

Expand Down

0 comments on commit d786dea

Please sign in to comment.