Skip to content

Commit 91a3148

Browse files
add PolySharp for compiler features
1 parent af760df commit 91a3148

File tree

6 files changed

+8
-48
lines changed

6 files changed

+8
-48
lines changed

Code/Helpers/Compiler/CompilerRequiredAttributes.cs

Lines changed: 0 additions & 21 deletions
This file was deleted.

Code/Helpers/Compiler/IsExternalInit.cs.cs

Lines changed: 0 additions & 9 deletions
This file was deleted.

Code/Helpers/Compiler/NotNullWhenAttribute.cs

Lines changed: 0 additions & 11 deletions
This file was deleted.

Code/Helpers/Extensions/StringExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public static class StringExtensions
1313
[Pure]
1414
public static string LowerFirst(this string str)
1515
{
16-
return str.Substring(0, 1).ToLower() + str.Substring(1);
16+
return str[0].ToString().ToLower() + str[1..];
1717
}
1818

1919
// python ahh

Code/MethodSystem/Methods/HTTPMethods/HTTPGetMethod.cs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,9 @@ public class HTTPGetMethod : YieldingReferenceReturningMethod<JObject>, ICanErro
1818
public override string Description =>
1919
"Sends a GET request to a provided URL and returns the response as a JSON object.";
2020

21-
public string[] ErrorReasons =>
22-
[
23-
"Fetched value from the URL is not a valid JSON object.",
24-
nameof(UnityWebRequest.Result.ConnectionError),
25-
nameof(UnityWebRequest.Result.DataProcessingError),
26-
nameof(UnityWebRequest.Result.ProtocolError)
21+
public string[] ErrorReasons => [
22+
..HTTPPostMethod.HttpErrorReasons,
23+
"Provided response was not a valid JSON object."
2724
];
2825

2926
public override Argument[] ExpectedArguments { get; } =

SER.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,10 @@
9292
<PackageReference Include="NCalc" Version="1.3.8" />
9393
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
9494
<PackageReference Include="Northwood.LabAPI" Version="1.1.5" />
95+
<PackageReference Include="PolySharp" Version="1.15.0">
96+
<PrivateAssets>all</PrivateAssets>
97+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
98+
</PackageReference>
9599
</ItemGroup>
96100
<ItemGroup>
97101
<Folder Include="Code\" />

0 commit comments

Comments
 (0)