Skip to content

Apply CA1835 - Prefer memory overloads for Stream.ReadAsync/WriteAsync - #35941

Merged
carlossanlop merged 2 commits into
dotnet:masterfrom
carlossanlop:RoslynStreamAsync
May 12, 2020
Merged

carlossanlop merged 2 commits into
dotnet:masterfrom
carlossanlop:RoslynStreamAsync

Conversation

@carlossanlop

Copy link
Copy Markdown
Contributor

The CA1835 Roslyn analyzer/fixer has been merged to dotnet/roslyn-analyzers and now the rule needs to be applied in dotnet/runtime.

Prefer Memory overloads for Stream.Read/WriteAsync #33790

Comment thread src/libraries/System.Private.Xml/src/System/Xml/Core/XmlTextReaderImplAsync.cs Outdated
Comment thread src/libraries/System.Private.Xml/src/System/Xml/Core/XmlTextReaderImplAsync.cs Outdated

@GrabYourPitchforks GrabYourPitchforks left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

@carlossanlop

Copy link
Copy Markdown
Contributor Author

The unit tests for XmlUtf8RawTextWriterAsync are failing. I'm investigating.

Comment thread src/libraries/System.Private.Xml/src/System/Xml/Core/XmlUtf8RawTextWriterAsync.cs Outdated
- Prefer the Stream.ReadAsync and Stream.WriteAsync memory overloads.
- Unit test fix suggested by buyaa-n to adjust the usage of these overloads.
@carlossanlop

Copy link
Copy Markdown
Contributor Author

@buyaa-n the unit tests passed with your suggested additions. Thanks for your help. I'll merge this now.

@carlossanlop
carlossanlop merged commit 14094d2 into dotnet:master May 12, 2020
@carlossanlop
carlossanlop deleted the RoslynStreamAsync branch May 12, 2020 18:36
@ghost ghost locked as resolved and limited conversation to collaborators Dec 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants