Skip to content

Commit 43f7eb1

Browse files
committed
fix: Remove AppendFormatted(string?) from interpolated handler
Removed the AppendFormatted(string?) method from CSharpInterpolatedStringHandler, as its functionality is now redundant. Also updated the #if NET6_0_OR_GREATER directive to wrap the namespace declaration for improved clarity and consistency.
1 parent e039b7f commit 43f7eb1

1 file changed

Lines changed: 1 addition & 14 deletions

File tree

src/NetEvolve.CodeBuilder/CSharpCodeBuilder.AppendInterpolated.cs

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
#if NET6_0_OR_GREATER
12
namespace NetEvolve.CodeBuilder;
23

3-
#if NET6_0_OR_GREATER
44
using System.Globalization;
55
using System.Runtime.CompilerServices;
66

@@ -165,19 +165,6 @@ public void AppendFormatted<T>(T value, int alignment, string? format)
165165
_owner.HandlerRawAppend(str);
166166
}
167167

168-
/// <summary>Appends a string value from the interpolated string.</summary>
169-
/// <param name="value">The string to append.</param>
170-
public void AppendFormatted(string? value)
171-
{
172-
if (string.IsNullOrEmpty(value))
173-
{
174-
return;
175-
}
176-
177-
EnsureIndented();
178-
_owner.HandlerRawAppend(value);
179-
}
180-
181168
/// <summary>Appends a <see cref="ReadOnlySpan{T}"/> value from the interpolated string.</summary>
182169
/// <param name="value">The span to append.</param>
183170
public void AppendFormatted(ReadOnlySpan<char> value)

0 commit comments

Comments
 (0)