Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Binaryread2 #7

Open
wants to merge 20 commits into
base: master
Choose a base branch
from
Open

Binaryread2 #7

wants to merge 20 commits into from

Conversation

MarcoDorantes
Copy link
Contributor

All tests passed with BinaryReader.ReadChars-based processing.
There is room, of course, to evaluate a different approach entirely StreamReader-based.

Added MemoryStreamAsBinaryTest: an early exploration for byte[] as binary.
Introduced Read method for BinaryReader.
…inaryTest.

Changed CreateValuesFieldsSplitter to proctected as it is intended for implementators of ValuesFileParser.
… packets & Positional or Delimited messages & Positional or Delimited values.
Added test cases for new CircularBuffer.ReadBytesUpTo new method.
…art of Text(STX) and U+0003 End of Text(ETX) as separators case.
…ith incomplete record at the start of the byte frame.
Added Bytes_vs_Chars_DifferenceAwareness_SampleCase2 and Bytes_vs_Chars_DifferenceAwareness_SampleCase3
There is room to evaluate a different approach entirely StreamReader-based.
@MarcoDorantes
Copy link
Contributor Author

@xxlxii
All tests so far passed, but there is a problem: there is a breaking-change. All byte parameters now must be cast as char parameters.

@MarcoDorantes
Copy link
Contributor Author

@xxlxii
Of course, we can avoid the breaking-change by duplicating the whole set of current tests and support previous byte parameters for backward compatibility. Nevertheless, for byte parameters the previous released version can be used still.

@MarcoDorantes
Copy link
Contributor Author

One of the reasons for the new binaryread2 branch is, in part, because of this referred conversation:
https://social.msdn.microsoft.com/Forums/en-US/77c389ae-1b38-4568-9b97-aeec4c101150/how-to-get-the-encoding-instance-used-by-a-binaryreader?forum=netfxbcl

@MarcoDorantes
Copy link
Contributor Author

@xxlxii
Besides, maybe we should not be messing around with byte[] and BinaryReader and go all around with char[] and StreamReader. Could we please meet to discuss this before continue? We would need to define the road ahead before even documenting sample cases.

@MarcoDorantes
Copy link
Contributor Author

@xxlxii
This last commit: 40763db

could be the candidate for the transition from byte[] to char[] for the binary test cases other than the ByteReaderTest1 test case.

@MarcoDorantes
Copy link
Contributor Author

@xxlxii
As discussed, could you please send the sample files with actual data to be processed by the positional feature?

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.

1 participant