jborean93 / PowerShell-Yayaml

A YAML parser and writer that uses an Assembly Load Context on PowerShell 7+
MIT License
31 stars 2 forks source link

Add support for Span and Memory types #8

Closed jborean93 closed 1 year ago

jborean93 commented 1 year ago

Adds support for serializing any Span, Memory, or their ReadOnly* variants. These types are treated as a plain array copy of the underlying value.

This commit also changes treats any IList value as a !!binary value for the Yaml11 schema. Previously it only treated byte[] arrays.

codecov[bot] commented 1 year ago

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (c8b6b84) 95.40% compared to head (079e68a) 95.02%. Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #8 +/- ## ========================================== - Coverage 95.40% 95.02% -0.39% ========================================== Files 14 15 +1 Lines 980 1407 +427 ========================================== + Hits 935 1337 +402 - Misses 45 70 +25 ``` | [Flag](https://app.codecov.io/gh/jborean93/PowerShell-Yayaml/pull/8/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jordan+Borean) | Coverage Δ | | |---|---|---| | [PS_7.2_x64_Linux](https://app.codecov.io/gh/jborean93/PowerShell-Yayaml/pull/8/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jordan+Borean) | `95.02% <95.50%> (-0.39%)` | :arrow_down: | | [PS_7.2_x64_Windows](https://app.codecov.io/gh/jborean93/PowerShell-Yayaml/pull/8/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jordan+Borean) | `?` | | | [PS_7.3_x64_Linux](https://app.codecov.io/gh/jborean93/PowerShell-Yayaml/pull/8/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jordan+Borean) | `95.02% <95.50%> (-0.39%)` | :arrow_down: | | [PS_7.3_x64_Windows](https://app.codecov.io/gh/jborean93/PowerShell-Yayaml/pull/8/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jordan+Borean) | `?` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jordan+Borean#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files](https://app.codecov.io/gh/jborean93/PowerShell-Yayaml/pull/8?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jordan+Borean) | Coverage Δ | | |---|---|---| | [src/Yayaml.Module/ReflectionHelper.cs](https://app.codecov.io/gh/jborean93/PowerShell-Yayaml/pull/8?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jordan+Borean#diff-c3JjL1lheWFtbC5Nb2R1bGUvUmVmbGVjdGlvbkhlbHBlci5jcw==) | `100.00% <100.00%> (ø)` | | | [src/Yayaml/Yaml11Schema.cs](https://app.codecov.io/gh/jborean93/PowerShell-Yayaml/pull/8?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jordan+Borean#diff-c3JjL1lheWFtbC9ZYW1sMTFTY2hlbWEuY3M=) | `94.30% <100.00%> (-1.55%)` | :arrow_down: | | [src/Yayaml/Yaml12JSONSchema.cs](https://app.codecov.io/gh/jborean93/PowerShell-Yayaml/pull/8?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jordan+Borean#diff-c3JjL1lheWFtbC9ZYW1sMTJKU09OU2NoZW1hLmNz) | `99.35% <100.00%> (+0.25%)` | :arrow_up: | | [src/Yayaml/Yaml12Schema.cs](https://app.codecov.io/gh/jborean93/PowerShell-Yayaml/pull/8?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jordan+Borean#diff-c3JjL1lheWFtbC9ZYW1sMTJTY2hlbWEuY3M=) | `100.00% <ø> (ø)` | | | [src/Yayaml.Module/ConvertToYaml.cs](https://app.codecov.io/gh/jborean93/PowerShell-Yayaml/pull/8?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jordan+Borean#diff-c3JjL1lheWFtbC5Nb2R1bGUvQ29udmVydFRvWWFtbC5jcw==) | `91.09% <86.20%> (-0.06%)` | :arrow_down: | ... and [9 files with indirect coverage changes](https://app.codecov.io/gh/jborean93/PowerShell-Yayaml/pull/8/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jordan+Borean)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.