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

Use PayloadReader in System.Resources.Extensions #102379

Merged
merged 40 commits into from
Jun 10, 2024
Merged

Commits on May 17, 2024

  1. Configuration menu
    Copy the full SHA
    241157e View commit details
    Browse the repository at this point in the history
  2. set IsPackable to false so the package is not published anywhere, mak…

    …e types internal so they can be included as links from other project
    adamsitnik committed May 17, 2024
    Configuration menu
    Copy the full SHA
    fdbaf50 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    1da4a10 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    ba62c25 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    f0c20fc View commit details
    Browse the repository at this point in the history
  6. change the namespace from System.Windows.Forms.BinaryFormat to System…

    ….Resources.Extensions.BinaryFormat
    adamsitnik committed May 17, 2024
    Configuration menu
    Copy the full SHA
    39dd889 View commit details
    Browse the repository at this point in the history
  7. switch

    adamsitnik committed May 17, 2024
    Configuration menu
    Copy the full SHA
    00608e4 View commit details
    Browse the repository at this point in the history

Commits on May 20, 2024

  1. Configuration menu
    Copy the full SHA
    6354a91 View commit details
    Browse the repository at this point in the history
  2. Revert "try to handle the type and assembly name mangling"

    This reverts commit 6354a91.
    adamsitnik committed May 20, 2024
    Configuration menu
    Copy the full SHA
    ba41ff0 View commit details
    Browse the repository at this point in the history
  3. use BinaryFormatter as a fallback when we get NotSupportedException e…

    …xception and the stream is seekable
    adamsitnik committed May 20, 2024
    Configuration menu
    Copy the full SHA
    cde8100 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    3a90452 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    37200dc View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    6a36687 View commit details
    Browse the repository at this point in the history

Commits on May 22, 2024

  1. copy WinForms tests

    adamsitnik committed May 22, 2024
    Configuration menu
    Copy the full SHA
    d4de6ee View commit details
    Browse the repository at this point in the history
  2. make the WinForms tests compile and pass:

    - add missing usings
    - remove writer tests
    - update stored blobs that had different assembly key
    - use hardcoded assembly name as it's used in the resources
    - move some of the tests to PayloadReader as they belong there
    adamsitnik committed May 22, 2024
    Configuration menu
    Copy the full SHA
    1cb10c1 View commit details
    Browse the repository at this point in the history

Commits on May 23, 2024

  1. fix the build (when creating a trimmed list, the serialized size must…

    … be less or equal than the List array length)
    adamsitnik committed May 23, 2024
    Configuration menu
    Copy the full SHA
    eb0270f View commit details
    Browse the repository at this point in the history
  2. change public API: ArrayRecord can represent multi-dimensional array …

    …so it must return lengths for all dimensions
    adamsitnik committed May 23, 2024
    Configuration menu
    Copy the full SHA
    3b4cda3 View commit details
    Browse the repository at this point in the history
  3. address code review feedback:

    - remove env var
    - remove redundant attribute annotation
    - enable AOT analyzer and annotate the code, use Array.CreateInstanceFromArrayType when possible
    - throw immediately once invalid input is read (to reduce the number of places we throw), add missing tests
    - use Resources to get exception messages
    adamsitnik committed May 23, 2024
    Configuration menu
    Copy the full SHA
    cabd585 View commit details
    Browse the repository at this point in the history

Commits on May 24, 2024

  1. remove the fallback to BF

    adamsitnik committed May 24, 2024
    Configuration menu
    Copy the full SHA
    a92a528 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6f6d03f View commit details
    Browse the repository at this point in the history
  3. fix the build?

    adamsitnik committed May 24, 2024
    Configuration menu
    Copy the full SHA
    891365f View commit details
    Browse the repository at this point in the history

Commits on May 27, 2024

  1. Apply suggestions from code review

    Co-authored-by: Jan Kotas <jkotas@microsoft.com>
    adamsitnik and jkotas committed May 27, 2024
    Configuration menu
    Copy the full SHA
    7a60a3f View commit details
    Browse the repository at this point in the history
  2. Apply suggestions from code review

    Co-authored-by: Jeremy Barton <jbarton@microsoft.com>
    adamsitnik and bartonjs committed May 27, 2024
    Configuration menu
    Copy the full SHA
    ec629c9 View commit details
    Browse the repository at this point in the history
  3. Apply suggestions from code review

    Co-authored-by: Jeremy Barton <jbarton@microsoft.com>
    adamsitnik and bartonjs committed May 27, 2024
    Configuration menu
    Copy the full SHA
    6fb3a54 View commit details
    Browse the repository at this point in the history
  4. address code review feedback:

    - move the files to match the existing source code path convention
    - adjust namespaces (and base64 serialized objects that used the old namespace and library name)
    - fix AOT annotation
    - fix the build (by not using Windows-specific test data on other platforms)
    - rename "Binary Format" and "Binary Formatter" to "NRBF"
    - fix formatting
    - throw ArgumentException for non-seekable Streams (don't expect that using Position will throw for them)
    adamsitnik committed May 27, 2024
    Configuration menu
    Copy the full SHA
    0b10f6b View commit details
    Browse the repository at this point in the history

Commits on May 28, 2024

  1. Configuration menu
    Copy the full SHA
    a8c3948 View commit details
    Browse the repository at this point in the history
  2. add WebSocketException to the exclusion list (because it's implementa…

    …tion on Mono formats stack trace in slightly different way)
    adamsitnik committed May 28, 2024
    Configuration menu
    Copy the full SHA
    b57bc2a View commit details
    Browse the repository at this point in the history

Commits on May 29, 2024

  1. address code review feedback:

    - remove parts of BinaryFormattedObjectExtensions used only in WinForms
    - remove FormatterConverterStub (not used here)
    - remove hashing from tests
    - add comment(s)
    - improve XML doc comments
    - rename ArrayType to BinaryArrayType and SerializedStreamHeaderRecord to SerializedStreamHeaderRecord to use same naming as spec everywhere
    - rename ContainsBinaryFormatterPayload to StartsWithPayloadHeader and change it accordingly
    - use "s_" prefix for static fields
    adamsitnik committed May 29, 2024
    Configuration menu
    Copy the full SHA
    a7134ef View commit details
    Browse the repository at this point in the history

Commits on Jun 3, 2024

  1. Apply suggestions from code review

    Co-authored-by: Jeremy Barton <jbarton@microsoft.com>
    adamsitnik and bartonjs committed Jun 3, 2024
    Configuration menu
    Copy the full SHA
    42e8199 View commit details
    Browse the repository at this point in the history
  2. Apply suggestions from code review

    Co-authored-by: Jeremy Barton <jbarton@microsoft.com>
    adamsitnik and bartonjs committed Jun 3, 2024
    Configuration menu
    Copy the full SHA
    00cb0a8 View commit details
    Browse the repository at this point in the history
  3. address code review feedback:

    - fix the build
    - don't hardcode current default value for ToArray(maxLength) argument, make it Int64 for non-SZArrays as the max length is bigger than int.MaxValue
    - add/fix comments
    - specify the type in explicit way when using new operator
    - local constants need to start with uppercase letter
    - make ObjecId abstract (to make it more explicit which records don't provide Id on purpose)
    - prefer "private protected" over "protected"
    - remove opinionated restriction for ObjectNullMultiple256Record
    - don't use seealso
    - rename Parse to Decode where input is binary
    - add argument validaiton for public methods
    - improve exception messages
    adamsitnik committed Jun 3, 2024
    Configuration menu
    Copy the full SHA
    243ec2e View commit details
    Browse the repository at this point in the history

Commits on Jun 4, 2024

  1. optimize perf for reading arrays of primitive types, but keep it safe…

    … at the same time (don't pre-allocate large buffers based on size read from payload when payload does not contain enough data)
    adamsitnik committed Jun 4, 2024
    Configuration menu
    Copy the full SHA
    c485e4a View commit details
    Browse the repository at this point in the history
  2. rename ToArray to GetArray and avoid allocating new array if possible…

    …, remove maxLength argument
    adamsitnik committed Jun 4, 2024
    Configuration menu
    Copy the full SHA
    3c1e72c View commit details
    Browse the repository at this point in the history

Commits on Jun 5, 2024

  1. solve last TODO: fix max size array support by avoiding Int32 overflo…

    …w for large multi-dimensional arrays
    adamsitnik committed Jun 5, 2024
    Configuration menu
    Copy the full SHA
    f175ff6 View commit details
    Browse the repository at this point in the history
  2. fix the build

    adamsitnik committed Jun 5, 2024
    Configuration menu
    Copy the full SHA
    d524a92 View commit details
    Browse the repository at this point in the history

Commits on Jun 6, 2024

  1. Apply suggestions from code review

    Co-authored-by: Jeremy Barton <jbarton@microsoft.com>
    adamsitnik and bartonjs committed Jun 6, 2024
    Configuration menu
    Copy the full SHA
    489c66a View commit details
    Browse the repository at this point in the history
  2. address code review feedback:

    - prefer NET over NETCOREAPP when writing #if defines
    - add ConditionalTheory to make the SkipTestException actually work
    - ObjectNullMultiple must not allow for 0 inputs
    - preallocate the List<T> for TFMs other than .NET
    adamsitnik committed Jun 6, 2024
    Configuration menu
    Copy the full SHA
    697cb0a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e3d1a7b View commit details
    Browse the repository at this point in the history

Commits on Jun 7, 2024

  1. improve arrays support:

    - ensure that reading arrays of primitive types is as fast as possible when there is enough data in the stream, throw when there is not, fall back to slow path when we don't know
    - make GetArray reuse the previously created instance
    - and provide tests for all of that
    adamsitnik committed Jun 7, 2024
    Configuration menu
    Copy the full SHA
    fdbd424 View commit details
    Browse the repository at this point in the history

Commits on Jun 10, 2024

  1. Don't check if serialized DataTable and DataSet produce exact same by…

    …tes as what is stored in the test source code. The blobs may not be identical (the output is not deterministic), but still valid.
    adamsitnik committed Jun 10, 2024
    Configuration menu
    Copy the full SHA
    3eefd4e View commit details
    Browse the repository at this point in the history