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

Add support for Half #362

Merged
merged 15 commits into from
May 21, 2021
Prev Previous commit
.
  • Loading branch information
SimonCropp committed May 20, 2021
commit e8cc6141bebafaca736c198c33ca4c1d25c325b9
2 changes: 1 addition & 1 deletion docs/serializer-settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -977,7 +977,7 @@ The default mapping is:
{typeof(ulong), (target, _) => ((ulong) target).ToString()},
{typeof(decimal), (target, _) => ((decimal) target).ToString(CultureInfo.InvariantCulture)},
#if NET5_0_OR_GREATER
// {typeof(Half), (target, settings) => ((Half) target).ToString(CultureInfo.InvariantCulture)},
{typeof(Half), (target, settings) => ((Half) target).ToString(CultureInfo.InvariantCulture)},
#endif
{typeof(float), (target, _) => ((float) target).ToString(CultureInfo.InvariantCulture)},
{typeof(double), (target, _) => ((double) target).ToString(CultureInfo.InvariantCulture)},
Expand Down
2 changes: 1 addition & 1 deletion src/Verify/Serialization/VerifierSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public static bool TryGetToString<T>(
{typeof(ulong), (target, _) => ((ulong) target).ToString()},
{typeof(decimal), (target, _) => ((decimal) target).ToString(CultureInfo.InvariantCulture)},
#if NET5_0_OR_GREATER
// {typeof(Half), (target, settings) => ((Half) target).ToString(CultureInfo.InvariantCulture)},
{typeof(Half), (target, settings) => ((Half) target).ToString(CultureInfo.InvariantCulture)},
#endif
{typeof(float), (target, _) => ((float) target).ToString(CultureInfo.InvariantCulture)},
{typeof(double), (target, _) => ((double) target).ToString(CultureInfo.InvariantCulture)},
Expand Down