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 .NET 9 Target #1095

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Add .NET 9 Target #1095

wants to merge 6 commits into from

Conversation

wsugarman
Copy link
Member

@wsugarman wsugarman commented Nov 20, 2024

Description

Updates the packages for .NET 9 and includes the following changes:

  • Add new .NET 9 for all packages
  • Remove deprecated .NET 7 target
  • Update package dependencies
  • Fix new style, performance, and compilation issues

Related issues

N/A

Testing

Existing tests

Semver Change

Breaking

@wsugarman wsugarman added dependencies Pull requests that update a dependency file .NET Pull requests that update .net code labels Nov 20, 2024
@@ -22,6 +22,6 @@ public static string ComputeHash(this string data)
EnsureArg.IsNotNull(data, nameof(data));

byte[] hash = SHA256.HashData(Encoding.UTF8.GetBytes(data));
return BitConverter.ToString(hash).Replace("-", string.Empty, StringComparison.Ordinal);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BitConverter.ToString(string) returns values like AB-CD-EF-01 but Convert.ToHexString skips the - entirely

@@ -136,8 +136,8 @@ private IEnumerable<MemberDeclarationSyntax> GetPropertiesAndMethods()
.GetParameters()
.Select(p => Parameter(Identifier(p.Name))
.WithType(p.ParameterType.ToTypeSyntax())
.WithModifiers(p.IsDefined(typeof(ParamArrayAttribute), false) ? TokenList(Token(SyntaxKind.ParamsKeyword)) : TokenList())
.WithOptionalAttributeLists(p.CustomAttributes))
.WithModifiers(ParamsTokenList(p))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes are to support signatures like:

public void Read(params scoped ReadOnlySpan<string> values)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file .NET Pull requests that update .net code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant