Skip to content

Commit a4e3c5e

Browse files
author
LinkDotNet Bot
committed
Updating to newest release
2 parents 740d4fc + 5ad3e8a commit a4e3c5e

15 files changed

+101
-35
lines changed

.github/dependabot.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ updates:
88
- package-ecosystem: "nuget" # See documentation for possible values
99
directory: "/" # Location of package manifests
1010
schedule:
11-
interval: "daily"
11+
interval: "monthly"
1212

1313
- package-ecosystem: "github-actions"
1414
directory: "/"
1515
schedule:
16-
interval: "daily"
16+
interval: "monthly"

.github/workflows/codeql.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,19 @@ jobs:
2424
- name: Checkout repository
2525
uses: actions/[email protected]
2626

27-
- uses: actions/setup-dotnet@v3.2.0
27+
- uses: actions/setup-dotnet@v4.0.0
2828
with:
2929
dotnet-version: |
3030
6.0.x
3131
7.0.x
3232
8.0.x
33+
9.0.x
3334
3435
- name: Initialize CodeQL
35-
uses: github/codeql-action/init@v2
36+
uses: github/codeql-action/init@v3
3637

3738
- name: Autobuild
38-
uses: github/codeql-action/autobuild@v2
39+
uses: github/codeql-action/autobuild@v3
3940

4041
- name: Perform CodeQL Analysis
41-
uses: github/codeql-action/analyze@v2
42+
uses: github/codeql-action/analyze@v3

.github/workflows/create-release.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,16 @@ jobs:
3434
path: ./CHANGELOG.md
3535

3636
- name: Setup dotnet
37-
uses: actions/setup-dotnet@v3.2.0
37+
uses: actions/setup-dotnet@v4.0.0
3838
with:
3939
dotnet-version: |
4040
6.0.x
4141
7.0.x
4242
8.0.x
43+
9.0.x
4344
4445
- name: Update CHANGELOG file
45-
uses: thomaseizinger/keep-a-changelog-new-release@1.3.0
46+
uses: thomaseizinger/keep-a-changelog-new-release@2.0.0
4647
with:
4748
version: ${{ github.event.inputs.versionIncrement }}
4849

.github/workflows/docs.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,13 @@ jobs:
1515
- uses: actions/[email protected]
1616

1717
- name: Setup .NET
18-
uses: actions/setup-dotnet@v3.2.0
18+
uses: actions/setup-dotnet@v4.0.0
1919
with:
2020
dotnet-version: |
2121
6.0.x
2222
7.0.x
2323
8.0.x
24+
9.0.x
2425
2526
- name: Setup DocFX
2627
uses: crazy-max/[email protected]

.github/workflows/dotnet.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,14 @@ jobs:
1414
steps:
1515
- uses: actions/[email protected]
1616
- name: Setup .NET
17-
uses: actions/setup-dotnet@v3.2.0
17+
uses: actions/setup-dotnet@v4.0.0
1818
with:
1919
dotnet-version: |
2020
6.0.x
2121
7.0.x
2222
8.0.x
23+
9.0.x
24+
2325
- name: Setup color
2426
run: |
2527
echo "DOTNET_SYSTEM_CONSOLE_ALLOW_ANSI_COLOR_REDIRECTION=1" >> $GITHUB_ENV

CHANGELOG.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ All notable changes to **ValueStringBuilder** will be documented in this file. T
66

77
## [Unreleased]
88

9+
## [1.19.0] - 2024-03-02
10+
11+
## Added
12+
13+
- Support for `net9.0`
14+
- New `Append` overload that accepts a single character
15+
916
## [1.18.6] - 2023-11-03
1017

1118
### Changed
@@ -381,7 +388,9 @@ This release brings extensions to the `ValueStringBuilder` API. For `v1.0` the `
381388

382389
- Initial release
383390

384-
[Unreleased]: https://github.com/linkdotnet/StringBuilder/compare/1.18.6...HEAD
391+
[Unreleased]: https://github.com/linkdotnet/StringBuilder/compare/1.19.0...HEAD
392+
393+
[1.19.0]: https://github.com/linkdotnet/StringBuilder/compare/1.18.6...1.19.0
385394

386395
[1.18.6]: https://github.com/linkdotnet/StringBuilder/compare/1.18.5...1.18.6
387396

Directory.Build.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<ItemGroup>
4-
<PackageReference Include="SonarAnalyzer.CSharp" Version="9.12.0.78982">
4+
<PackageReference Include="SonarAnalyzer.CSharp" Version="9.19.0.84025">
55
<PrivateAssets>all</PrivateAssets>
66
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
77
</PackageReference>
8-
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.507">
8+
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.556">
99
<PrivateAssets>all</PrivateAssets>
1010
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1111
</PackageReference>

src/LinkDotNet.StringBuilder/LinkDotNet.StringBuilder.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
4+
<TargetFrameworks>net6.0;net7.0;net8.0;net9.0</TargetFrameworks>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
77
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
@@ -40,11 +40,11 @@
4040
</PropertyGroup>
4141

4242
<ItemGroup>
43-
<PackageReference Include="Meziantou.Analyzer" Version="2.0.103">
43+
<PackageReference Include="Meziantou.Analyzer" Version="2.0.145">
4444
<PrivateAssets>all</PrivateAssets>
4545
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
4646
</PackageReference>
47-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1">
47+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0">
4848
<PrivateAssets>all</PrivateAssets>
4949
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
5050
</PackageReference>

src/LinkDotNet.StringBuilder/ValueStringBuilder.Append.cs

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,21 +75,39 @@ public unsafe void Append(char* value, int length)
7575
}
7676

7777
/// <summary>
78-
/// Adds the default new line separator.
78+
/// Appends a slice of memory.
7979
/// </summary>
80+
/// <param name="memory">The memory to add.</param>
8081
[MethodImpl(MethodImplOptions.AggressiveInlining)]
81-
public void AppendLine()
82+
public void Append(ReadOnlyMemory<char> memory)
8283
{
83-
Append(Environment.NewLine);
84+
Append(memory.Span);
8485
}
8586

8687
/// <summary>
87-
/// Appends a slice of memory.
88+
/// Appends a single character to the string builder.
8889
/// </summary>
89-
/// <param name="memory">The memory to add.</param>
90-
public void Append(ReadOnlyMemory<char> memory)
90+
/// <param name="value">Character to add.</param>
91+
[MethodImpl(MethodImplOptions.AggressiveInlining)]
92+
public void Append(char value)
9193
{
92-
Append(memory.Span);
94+
var newSize = bufferPosition + 1;
95+
if (newSize > buffer.Length)
96+
{
97+
Grow(newSize);
98+
}
99+
100+
buffer[bufferPosition] = value;
101+
bufferPosition++;
102+
}
103+
104+
/// <summary>
105+
/// Adds the default new line separator.
106+
/// </summary>
107+
[MethodImpl(MethodImplOptions.AggressiveInlining)]
108+
public void AppendLine()
109+
{
110+
Append(Environment.NewLine);
93111
}
94112

95113
/// <summary>

src/LinkDotNet.StringBuilder/ValueStringBuilder.AppendJoin.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ private void AppendJoinInternalString<T>(ReadOnlySpan<char> separator, IEnumerab
5555
}
5656

5757
var current = enumerator.Current;
58-
if (current != null)
58+
if (current is not null)
5959
{
6060
AppendInternal(current);
6161
}

0 commit comments

Comments
 (0)