Skip to content

Commit 593bbb5

Browse files
committed
Remove polysharp
1 parent caf3deb commit 593bbb5

File tree

2 files changed

+51
-4
lines changed

2 files changed

+51
-4
lines changed

src/Utf8StringInterpolation/Shims.cs

+51
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,57 @@
33
using System.Buffers.Text;
44
using System.Text;
55

6+
#if !NET6_0_OR_GREATER
7+
namespace System.Runtime.CompilerServices
8+
{
9+
/// <summary>
10+
/// Indicates the attributed type is to be used as an interpolated string handler.
11+
/// </summary>
12+
[global::System.AttributeUsage(
13+
global::System.AttributeTargets.Class |
14+
global::System.AttributeTargets.Struct,
15+
AllowMultiple = false, Inherited = false)]
16+
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
17+
internal sealed class InterpolatedStringHandlerAttribute : global::System.Attribute
18+
{
19+
}
20+
21+
/// <summary>
22+
/// Indicates which arguments to a method involving an interpolated string handler should be passed to that handler.
23+
/// </summary>
24+
[global::System.AttributeUsage(global::System.AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)]
25+
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
26+
internal sealed class InterpolatedStringHandlerArgumentAttribute : global::System.Attribute
27+
{
28+
/// <summary>
29+
/// Initializes a new instance of the <see cref="global::System.Runtime.CompilerServices.InterpolatedStringHandlerArgumentAttribute"/> class.
30+
/// </summary>
31+
/// <param name="argument">The name of the argument that should be passed to the handler.</param>
32+
/// <remarks><see langword="null"/> may be used as the name of the receiver in an instance method.</remarks>
33+
public InterpolatedStringHandlerArgumentAttribute(string argument)
34+
{
35+
Arguments = new string[] { argument };
36+
}
37+
38+
/// <summary>
39+
/// Initializes a new instance of the <see cref="global::System.Runtime.CompilerServices.InterpolatedStringHandlerArgumentAttribute"/> class.
40+
/// </summary>
41+
/// <param name="arguments">The names of the arguments that should be passed to the handler.</param>
42+
/// <remarks><see langword="null"/> may be used as the name of the receiver in an instance method.</remarks>
43+
public InterpolatedStringHandlerArgumentAttribute(params string[] arguments)
44+
{
45+
Arguments = arguments;
46+
}
47+
48+
/// <summary>
49+
/// Gets the names of the arguments that should be passed to the handler.
50+
/// </summary>
51+
/// <remarks><see langword="null"/> may be used as the name of the receiver in an instance method.</remarks>
52+
public string[] Arguments { get; }
53+
}
54+
}
55+
#endif
56+
657
namespace Utf8StringInterpolation
758
{
859
internal static partial class Shims

src/Utf8StringInterpolation/Utf8StringInterpolation.csproj

-4
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@
1111
<Description>Successor of ZString; UTF8 based zero allocation high-peformance String Interpolation and StringBuilder.</Description>
1212
</PropertyGroup>
1313

14-
<ItemGroup>
15-
<PackageReference Include="PolySharp" Version="1.7.1" />
16-
</ItemGroup>
17-
1814
<ItemGroup Condition="'$(TargetFramework)'=='netstandard2.0'">
1915
<PackageReference Include="System.Memory" Version="4.5.5" />
2016
</ItemGroup>

0 commit comments

Comments
 (0)