-
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into add-Delegate.HasSingleTarget
- Loading branch information
Showing
3 changed files
with
60 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
// <auto-generated /> | ||
#pragma warning disable | ||
|
||
namespace Polyfills; | ||
|
||
using System; | ||
using System.Runtime.CompilerServices; | ||
using System.Text; | ||
|
||
static partial class Polyfill | ||
{ | ||
#if FeatureMemory && !NET6_0_OR_GREATER | ||
|
||
/// <summary>Appends the specified interpolated string followed by the default line terminator to the end of the current StringBuilder object.</summary> | ||
/// <param name="handler">The interpolated string to append.</param> | ||
/// <returns>A reference to this instance after the append operation has completed.</returns> | ||
//Link: https://learn.microsoft.com/en-us/dotnet/api/system.text.stringbuilder.appendline#system-text-stringbuilder-appendline(system-text-stringbuilder-appendinterpolatedstringhandler@) | ||
public static StringBuilder AppendLine( | ||
StringBuilder target, | ||
[InterpolatedStringHandlerArgument(nameof(target))] | ||
ref AppendInterpolatedStringHandler handler) => | ||
target.AppendLine(); | ||
|
||
/// <summary>Appends the specified interpolated string followed by the default line terminator to the end of the current StringBuilder object.</summary> | ||
/// <param name="provider">An object that supplies culture-specific formatting information.</param> | ||
/// <param name="handler">The interpolated string to append.</param> | ||
/// <returns>A reference to this instance after the append operation has completed.</returns> | ||
//Link: https://learn.microsoft.com/en-us/dotnet/api/system.text.stringbuilder.appendline#system-text-stringbuilder-appendline(system-iformatprovider-system-text-stringbuilder-appendinterpolatedstringhandler@) | ||
public static StringBuilder AppendLine( | ||
StringBuilder target, | ||
IFormatProvider? provider, | ||
[InterpolatedStringHandlerArgument(nameof(target), nameof(provider))] | ||
ref AppendInterpolatedStringHandler handler) => | ||
target.AppendLine(); | ||
|
||
#elif NET6_0_OR_GREATER | ||
|
||
/// <summary>Appends the specified interpolated string followed by the default line terminator to the end of the current StringBuilder object.</summary> | ||
/// <param name="handler">The interpolated string to append.</param> | ||
/// <returns>A reference to this instance after the append operation has completed.</returns> | ||
//Link: https://learn.microsoft.com/en-us/dotnet/api/system.text.stringbuilder.appendline#system-text-stringbuilder-appendline(system-text-stringbuilder-appendinterpolatedstringhandler@) | ||
public static StringBuilder AppendLine( | ||
StringBuilder target, | ||
[InterpolatedStringHandlerArgument(nameof(target))] ref StringBuilder.AppendInterpolatedStringHandler handler) => | ||
target.AppendLine(ref handler); | ||
|
||
/// <summary>Appends the specified interpolated string followed by the default line terminator to the end of the current StringBuilder object.</summary> | ||
/// <param name="provider">An object that supplies culture-specific formatting information.</param> | ||
/// <param name="handler">The interpolated string to append.</param> | ||
/// <returns>A reference to this instance after the append operation has completed.</returns> | ||
//Link: https://learn.microsoft.com/en-us/dotnet/api/system.text.stringbuilder.appendline#system-text-stringbuilder-appendline(system-iformatprovider-system-text-stringbuilder-appendinterpolatedstringhandler@) | ||
public static StringBuilder AppendLine( | ||
StringBuilder target, | ||
IFormatProvider? provider, | ||
[InterpolatedStringHandlerArgument(nameof(target), nameof(provider))] ref StringBuilder.AppendInterpolatedStringHandler handler) => | ||
target.AppendLine(provider, ref handler); | ||
#endif | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters