Skip to content

[SRM] Remove ReadOnlyUnmanagedMemoryStream. - #111321

Merged
jkotas merged 2 commits into
dotnet:mainfrom
teo-tsirpanis:ro-unmanaged-memory-stream
Jan 16, 2025
Merged

jkotas merged 2 commits into
dotnet:mainfrom
teo-tsirpanis:ro-unmanaged-memory-stream

Conversation

@teo-tsirpanis

Copy link
Copy Markdown
Contributor

It is a clone of UnmanagedMemoryStream, written for the NS1.x era where that class did not exist. This PR removes ReadOnlyUnmanagedMemoryStream and replaces all uses with UnmanagedMemoryStream.

@dotnet-policy-service dotnet-policy-service Bot added the community-contribution Indicates that the PR has been added by a community member label Jan 12, 2025
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @dotnet/area-system-reflection-metadata
See info in area-owners.md if you want to be subscribed.

{
constraints = new StreamConstraints(null, 0, _size);
return new ReadOnlyUnmanagedMemoryStream(_memory, _size);
return new UnmanagedMemoryStream(_memory, _size);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The overload with two parameters opens the stream in read-only mode.

@jkotas
jkotas merged commit 8a8871d into dotnet:main Jan 16, 2025
@teo-tsirpanis
teo-tsirpanis deleted the ro-unmanaged-memory-stream branch January 17, 2025 20:24
@teo-tsirpanis teo-tsirpanis added this to the 10.0.0 milestone Feb 11, 2025
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 13, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-System.Reflection.Metadata community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants