-
Notifications
You must be signed in to change notification settings - Fork 22
Closed
Description
While trying version 1.6.0 of the package, I found the issue that an extra method is generated for the Parse and TryParse methods when using Guids
The Parse(ReadOnlySpan<byte> ...) and TryParse(ReadOnlySpan<byte> ...) are not defined on the Guid method but for the numeric types
The generated code is the following:
#if NET8_0_OR_GREATER
public static UserId Parse(ReadOnlySpan<byte> utf8Text, IFormatProvider? provider)
{
return new UserId(System.Guid.Parse(utf8Text, provider));
}
public static bool TryParse(ReadOnlySpan<byte> utf8Text, IFormatProvider? provider, out UserId result)
{
if (System.Guid.TryParse(utf8Text, provider, out var r))
{
result = new UserId(r);
return true;
}
else
{
result = default(UserId);
return false;
}
}
#endif
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels