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

Extend PayloadReader APIs to meet the WinForms requirements #11341

Open
wants to merge 14 commits into
base: SafePayloadReader
Choose a base branch
from

Commits on May 9, 2024

  1. extend PayloadReader public API surface:

    - RecordMap needs to remain internal, but implement IReadOnlyDictionary<int, SerializationRecord> so it can be returned from a public method without exposing the type itself
    - introduce new PayloadReader.Read overload that can return RecordMap via out parameter
    - make SerializationRecord.ObjectId public
    - make MemberReferenceRecord public, expose Reference property
    adamsitnik committed May 9, 2024
    Configuration menu
    Copy the full SHA
    b59abfd View commit details
    Browse the repository at this point in the history

Commits on May 10, 2024

  1. extend PayloadReader public API surface:

    - extend ArrayRecord with ElementTypeName and ElementTypeLibraryName public properties
    adamsitnik committed May 10, 2024
    Configuration menu
    Copy the full SHA
    297381c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    25e123e View commit details
    Browse the repository at this point in the history
  3. remove code that won't be needed for reading, move code that will be …

    …needed for writing to System.Windows.Forms where it's used (System.Windows.Forms compiles)
    adamsitnik committed May 10, 2024
    Configuration menu
    Copy the full SHA
    c6f612d View commit details
    Browse the repository at this point in the history

Commits on May 13, 2024

  1. - update test project so it compiles

    - stop using internal APIs
    - fix the bugs:
    	- update the record map, so mapping system class of common primtive types to PrimitiveTypeRecord<T> is visible also to those who access it via Id
    	- add missing support for mapping to PrimitiveTypeRecord for IntPtr and UIntPtr
    	- use GetSerializationRecord when unwrapping
    - remove FormatterTypeStyle.TypesWhenNeeded test (not supported)
    - remove tests for internal APIs tested in PayloadReader project:
    	- RecordMapTests
    	- NullRecordTests
    	- ClassInfoTests
    	- MemberTypeInfo
    adamsitnik committed May 13, 2024
    Configuration menu
    Copy the full SHA
    ce67096 View commit details
    Browse the repository at this point in the history

Commits on May 14, 2024

  1. fix the bugs:

    - check records by Ids to detect custom comparers for Hashtable
    - ObjectRecordDeserializer needs to handle ArrayRecords and raw primitive values
    - add support for jagged arrays with custom offsets (just to rejct them later)
    - materialize arrays of primitive types using the provided API
    - when mapping System Classes to PrimitiveTypeRecord<T> the Ids need to be preserved
    - don't iterate over the same member twice
    - support arrays of nullable primitives (don't represent them as ArrayRecord<ClassRecord> because they consists of MemberPrimitiveTypedRecord and NullsRecords)
    adamsitnik committed May 14, 2024
    Configuration menu
    Copy the full SHA
    045baed View commit details
    Browse the repository at this point in the history
  2. disable some of the FormatterTypeStyle.TypesWhenNeeded tests (this ne…

    …eds a discussion whether we want to support that or not)
    adamsitnik committed May 14, 2024
    Configuration menu
    Copy the full SHA
    7f409ae View commit details
    Browse the repository at this point in the history
  3. move the payload reader code to separate project to ensure we are not…

    … using any of the internal APIs
    adamsitnik committed May 14, 2024
    Configuration menu
    Copy the full SHA
    85c01ff View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    7b7d485 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    c88443f View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    c63a18c View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    a8af796 View commit details
    Browse the repository at this point in the history

Commits on May 15, 2024

  1. address code review feedback:

    - FormatterTypeStyle.TypeAlways is a must have, remove unsupported RecordTypes from the public enum and throw NotSupportedException when they are provided
    - add support for Formatters.FormatterTypeStyle.XsdString
    - enable tests for FormatterTypeStyle.TypesAlways | FormatterTypeStyle.XsdStringr
    adamsitnik committed May 15, 2024
    Configuration menu
    Copy the full SHA
    f9e1aee View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a3043a2 View commit details
    Browse the repository at this point in the history