bigjt
1a7495a6dd
[C#] Add GetBytes methods for fixed arrays ( #8633 )
...
* [C#] Add GetBytes methods for fixed arrays
I wanted to direct access to fixed array bytes. I made some changes to the idl generator to create GetBytes functions following the same naming conventions used for vectors of scalar types. There was not a 'Length' field present to bound the existing index accessor so I added that too.
+ Add generic GetBytes for fixed length arrays of scalar types
+ Implement conditional compilation for ENABLE_SPAN_T:
- ENABLE_SPAN_T: Returns `Span<T>` using `MemoryMarshal.Cast<byte, T>()` as needed.
- Else: Returns `ArraySegment<byte>?` for raw byte access
+ Added tests reusing arrays_test.fbs definitions
+ Added const int Length field to support existing index based accessors
* [C#] Sync generated code for after adding GetBytes methods for fixed arrays
---------
Co-authored-by: Björn Harrtell <bjornharrtell@users.noreply.github.com >
2026-02-04 23:13:32 +00:00
..
2025-07-22 23:57:39 -07:00
2015-05-12 15:40:29 -07:00
2022-09-01 10:17:34 -07:00
2023-04-26 05:19:07 +00:00
2025-12-01 11:28:50 -05:00
2023-04-28 17:10:01 +00:00
2025-12-19 15:06:07 -08:00
2025-12-19 15:06:07 -08:00
2017-03-29 09:51:12 -07:00
2025-07-22 23:57:39 -07:00
2025-12-01 11:28:50 -05:00
2023-09-30 18:54:48 -07:00
2023-04-26 05:19:07 +00:00
2021-06-03 14:17:40 -07:00
2023-04-28 17:10:01 +00:00
2025-12-19 15:06:07 -08:00
2025-12-19 15:06:07 -08:00
2019-02-04 23:33:57 +01:00
2024-06-03 08:39:14 -07:00
2023-09-30 18:54:48 -07:00
2023-04-26 05:19:07 +00:00
2021-06-03 14:17:40 -07:00
2023-04-28 17:10:01 +00:00
2025-12-19 15:06:07 -08:00
2025-12-19 15:06:07 -08:00
2019-02-04 23:33:57 +01:00
2024-06-03 08:39:14 -07:00
2021-06-03 14:17:40 -07:00
2021-06-03 14:17:40 -07:00
2023-09-30 18:54:48 -07:00
2023-04-26 05:19:07 +00:00
2021-06-03 14:17:40 -07:00
2023-04-28 17:10:01 +00:00
2025-12-19 15:06:07 -08:00
2025-12-19 15:06:07 -08:00
2019-05-30 16:02:57 -07:00
2024-06-03 08:39:14 -07:00
2021-06-03 14:17:40 -07:00
2026-02-04 23:13:32 +00:00
2025-12-01 11:28:50 -05:00
2025-07-22 23:57:39 -07:00
2025-07-22 23:57:39 -07:00
2025-12-01 11:28:50 -05:00
2025-12-19 15:06:07 -08:00
2025-12-19 15:06:07 -08:00
2025-07-22 23:57:39 -07:00
2025-07-22 23:57:39 -07:00
2025-12-01 11:28:50 -05:00
2020-02-10 17:43:36 -08:00
2019-06-02 12:36:49 -07:00
2021-06-03 14:17:40 -07:00
2023-04-28 17:10:01 +00:00
2025-12-19 15:06:07 -08:00
2025-12-19 15:06:07 -08:00
2019-06-02 12:36:49 -07:00
2021-12-09 15:47:09 -08:00
2022-03-04 21:57:48 -08:00
2022-03-04 21:57:48 -08:00
2022-10-20 18:15:00 -07:00
2023-04-28 17:10:01 +00:00
2025-12-19 15:06:07 -08:00
2025-12-19 15:06:07 -08:00
2022-03-04 21:57:48 -08:00
2022-03-04 21:57:48 -08:00
2025-09-23 21:50:27 -07:00
2025-12-19 15:06:07 -08:00
2025-12-01 09:50:03 -05:00
2025-12-19 15:06:07 -08:00
2025-12-19 15:06:07 -08:00
2026-02-04 13:05:08 +00:00
2025-12-19 15:06:07 -08:00
2023-05-09 09:16:30 -07:00
2026-01-21 01:01:20 +00:00
2021-02-19 12:47:59 +03:00
2025-09-23 21:50:27 -07:00
2025-12-01 11:28:50 -05:00
2026-02-04 23:13:32 +00:00
2025-12-01 11:28:50 -05:00
2025-07-22 23:57:39 -07:00
2025-07-22 23:57:39 -07:00
2025-12-01 11:28:50 -05:00
2020-02-10 17:43:36 -08:00
2019-09-05 10:22:04 -07:00
2021-06-03 14:17:40 -07:00
2023-04-28 17:10:01 +00:00
2025-12-19 15:06:07 -08:00
2025-12-19 15:06:07 -08:00
2019-09-05 10:22:04 -07:00
2021-12-09 15:47:09 -08:00
2025-12-19 15:06:07 -08:00
2023-04-26 05:19:07 +00:00
2025-12-19 15:06:07 -08:00
2025-12-19 15:06:07 -08:00
2025-12-19 15:06:07 -08:00
2025-12-19 15:06:07 -08:00
2018-03-05 15:47:16 -08:00
2025-07-22 23:57:39 -07:00
2025-12-01 11:28:50 -05:00
2025-12-19 15:06:07 -08:00
2023-04-26 05:19:07 +00:00
2025-12-19 15:06:07 -08:00
2025-12-19 15:06:07 -08:00
2025-12-19 15:06:07 -08:00
2025-12-19 15:06:07 -08:00
2016-05-26 15:26:58 +02:00
2025-07-22 23:57:39 -07:00
2025-12-01 11:28:50 -05:00
2022-09-01 10:17:34 -07:00
2023-04-26 05:19:07 +00:00
2025-12-01 11:28:50 -05:00
2023-04-28 17:10:01 +00:00
2025-12-19 15:06:07 -08:00
2025-12-19 15:06:07 -08:00
2021-03-29 19:56:45 -04:00
2025-07-22 23:57:39 -07:00
2022-09-01 10:17:34 -07:00
2023-04-26 05:19:07 +00:00
2025-12-01 11:28:50 -05:00
2023-04-28 17:10:01 +00:00
2025-12-19 15:06:07 -08:00
2025-12-19 15:06:07 -08:00
2022-03-23 21:40:11 -07:00
2025-07-22 23:57:39 -07:00
2025-12-01 11:28:50 -05:00
2025-12-01 11:28:50 -05:00
2022-09-01 10:17:34 -07:00
2023-04-26 05:19:07 +00:00
2025-12-01 11:28:50 -05:00
2023-04-28 17:10:01 +00:00
2025-12-19 15:06:07 -08:00
2025-12-19 15:06:07 -08:00
2016-05-26 15:26:58 +02:00
2025-07-22 23:57:39 -07:00
2020-02-10 17:43:36 -08:00
2021-06-03 14:17:40 -07:00
2025-09-23 21:50:27 -07:00
2021-12-09 15:47:09 -08:00
2025-07-17 12:37:19 -07:00
2025-12-19 15:06:07 -08:00
2023-04-26 05:19:07 +00:00
2025-12-19 15:06:07 -08:00
2025-12-19 15:06:07 -08:00
2025-12-19 15:06:07 -08:00
2025-12-19 15:06:07 -08:00
2019-05-09 10:07:38 -07:00
2025-07-22 23:57:39 -07:00
2025-12-01 11:28:50 -05:00
2025-12-01 11:28:50 -05:00
2025-12-19 15:06:07 -08:00
2023-04-26 05:19:07 +00:00
2025-12-19 15:06:07 -08:00
2025-12-19 15:06:07 -08:00
2025-12-19 15:06:07 -08:00
2025-12-19 15:06:07 -08:00
2018-12-20 16:10:20 -08:00
2026-01-21 01:01:20 +00:00
2025-12-01 11:28:50 -05:00
2022-09-01 10:17:34 -07:00
2023-04-26 05:19:07 +00:00
2025-12-01 11:28:50 -05:00
2023-04-28 17:10:01 +00:00
2025-12-19 15:06:07 -08:00
2025-12-19 15:06:07 -08:00
2019-05-09 10:07:38 -07:00
2025-07-22 23:57:39 -07:00
2025-12-01 11:28:50 -05:00