Skip to content

Conversation

@kshyju
Copy link
Member

@kshyju kshyju commented Oct 7, 2022

Fixes #1078

Exposing 2 new overloads which internally calls the Stream.WriteAsync overload which takes a CancellationToken instance

public static Task WriteBytesAsync(this HttpResponseData response, byte[] value, CancellationToken cancellationToken)
public static Task WriteStringAsync(this HttpResponseData response, string value, 
                                                    CancellationToken cancellationToken, Encoding? encoding = null)

Not bumping up package version as I think we can club this change with other ones.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the new overload we are exposing.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the other new overload we are exposing.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is still grammatically correct, but if you want to match the other summaries this is missing an 's' (writes not write).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good eye 🔍. Fixed.

@kshyju kshyju force-pushed the shkr/gh1078_writeasync_with_cancellation_token branch from 508f694 to f6b0d64 Compare October 12, 2022 15:09
@kshyju
Copy link
Member Author

kshyju commented Oct 12, 2022

/check-enforcer evaluate

@kshyju
Copy link
Member Author

kshyju commented Oct 12, 2022

/check-enforcer reset

@kshyju kshyju merged commit 853fc0a into main Oct 12, 2022
@kshyju kshyju deleted the shkr/gh1078_writeasync_with_cancellation_token branch October 12, 2022 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expose new overloads for WriteStringAsync and WriteBytesAsync extension methods

5 participants