Skip to content

Improve the Byte array binding in the configuration source generator #116928

Open
@tarekgh

Description

@tarekgh

The configuration source generator currently supports binding a byte[] only from Base64-encoded strings. This issue aims to enhance byte array binding to align with the behavior of runtime reflection-based binding. The improvements should include:

  • Support for array values in configuration: Enable binding from array-style configuration values (e.g., JSON entries like byteArray: [1, 2, 3, 4]) in addition to Base64 strings.
  • Preserve and extend existing arrays: When binding to an already-initialized (non-null) byte array, the configuration values should be appended to the existing array rather than replacing it—consistent with the behavior of other array types.
  • Error handling for invalid values: If invalid configuration values are encountered, an exception should be thrown when the BindingOption.ErrorOnUnknownConfiguration flag is enabled.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions