- Notifications
You must be signed in to change notification settings - Fork4.2k
Write and read uniformly in objectwriter/objectreader#71877
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
| caseTypeCode.Null:returnnull; | ||
| caseTypeCode.Boolean_True:returntrue; | ||
| caseTypeCode.Boolean_False:returnfalse; | ||
| caseTypeCode.Int8:return_reader.ReadSByte(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
direct access of the reader makes the code harder to update since it's the reader itself that is being swapped out in the new world.
| if(value==null) | ||
| { | ||
| _writer.Write((byte)TypeCode.Null); | ||
| WriteByte((byte)TypeCode.Null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
same with direct access of the writer.
ToddGrun commentedJan 30, 2024
ToddGrun commentedJan 30, 2024
This is for "_writer.Write(word);" in case codeflow messed that up In reply to:1917877589 Refers to: src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/Serialization/ObjectWriter.cs:607 in432d746. [](commit_id =432d746, deletion_comment = False) |
ToddGrun commentedJan 30, 2024
Should WriteVersion be modified call WriteByte? In reply to:1917878270 Refers to: src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/Serialization/ObjectWriter.cs:607 in432d746. [](commit_id =432d746, deletion_comment = False) |
ToddGrun left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
![]()
This will help with a larger refactoring i'm making here to make it so that these readers/writers can be used efficiently on pipes.