This repository has been archived by the owner on Jan 24, 2021. It is now read-only.
WIP - First stab at creating a BodyDelegate type #2577
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Prerequisites
Description
Initial stab at pulling out the body delegate to its own type to allow for casts to/from the actual async and non-async delegate signatures - idea being we patch up everything by adding a cast to Action to make it build (unfortunately implicit casts and delegates still need an explicit cast), then we can work through bit by bit making them async, then remove the cast option from the sync delegate type at a later date.
Already fixed up the Nancy project itself, which shows both "asyncing" the bits that make sense, and just straight casting the bits that don't (such as when writing a string).