Skip to content

Commit

Permalink
Merge branch 'main' into net9
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCropp committed Feb 19, 2024
2 parents e72aaa1 + 76ba7f8 commit e13db67
Show file tree
Hide file tree
Showing 18 changed files with 261 additions and 321 deletions.
103 changes: 60 additions & 43 deletions api_list.include.md

Large diffs are not rendered by default.

107 changes: 65 additions & 42 deletions readme.md

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions src/Consume/Consume.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
#pragma warning disable CS4014
Expand Down Expand Up @@ -198,6 +199,13 @@ async Task StreamReaderReadAsync()
var reader = new StreamReader(new MemoryStream());
var read = await reader.ReadAsync(memory);
}

void RegexIsMatch()
{
var regex = new Regex("result");
regex.IsMatch("value".AsSpan());
}

async Task StreamReadAsync()
{
var input = new byte[]
Expand Down
24 changes: 2 additions & 22 deletions src/Consume/Consume.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,7 @@
<PackageReference Include="System.ValueTuple" Version="4.5.0" Condition="$(TargetFramework.StartsWith('net46'))" />
<PackageReference Include="System.Net.Http" Version="4.3.4" Condition="$(TargetFramework.StartsWith('net4'))" />
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.4" Condition="$(TargetFramework) == 'netstandard2.0' or $(TargetFramework) == 'netcoreapp2.0' or $(TargetFrameworkIdentifier) == '.NETFramework'" />
<Compile Include="..\Polyfill\*.cs">
<Link>Pollyfill\%(RecursiveDir)%(Filename).cs</Link>
</Compile>
<Compile Include="..\Polyfill\Nullable\*.cs">
<Link>Pollyfill\Nullable\%(RecursiveDir)%(Filename).cs</Link>
</Compile>
<Compile Include="..\Polyfill\Nullability\*.cs">
<Link>Pollyfill\Nullability\%(RecursiveDir)%(Filename).cs</Link>
</Compile>
<Compile Include="..\Polyfill\IndexRange\*.cs">
<Link>Pollyfill\IndexRange\%(RecursiveDir)%(Filename).cs</Link>
</Compile>
<Compile Include="..\Polyfill\StringInterpolation\*.cs">
<Link>Pollyfill\StringInterpolation\%(RecursiveDir)%(Filename).cs</Link>
</Compile>
<Compile Include="..\Polyfill\Trimming\*.cs">
<Link>Pollyfill\Trimming\%(RecursiveDir)%(Filename).cs</Link>
</Compile>
<Compile Include="..\Polyfill\PlatformCompatibility\*.cs">
<Link>Pollyfill\PlatformCompatibility\%(RecursiveDir)%(Filename).cs</Link>
</Compile>
</ItemGroup>
<Import Project="$(ProjectDir)..\Polyfill\Polyfill.targets" />
<Import Project="$(SolutionDir)\Polyfill\Polyfill.targets" />
<Import Project="$(SolutionDir)\TestIncludes.targets" />
</Project>
24 changes: 2 additions & 22 deletions src/ConsumeClassicReferences/ConsumeClassicReferences.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,7 @@
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.4" Condition="$(TargetFramework) == 'netstandard2.0' or $(TargetFramework) == 'netcoreapp2.0' or $(TargetFrameworkIdentifier) == '.NETFramework'" />
<Reference Include="System.Net.Http" Condition="$(TargetFrameworkIdentifier) == '.NETFramework'" />
<Compile Include="..\Consume\*.cs" />
<Compile Include="..\Polyfill\*.cs">
<Link>Pollyfill\%(RecursiveDir)%(Filename).cs</Link>
</Compile>
<Compile Include="..\Polyfill\Nullable\*.cs">
<Link>Pollyfill\Nullable\%(RecursiveDir)%(Filename).cs</Link>
</Compile>
<Compile Include="..\Polyfill\Nullability\*.cs">
<Link>Pollyfill\Nullability\%(RecursiveDir)%(Filename).cs</Link>
</Compile>
<Compile Include="..\Polyfill\IndexRange\*.cs">
<Link>Pollyfill\IndexRange\%(RecursiveDir)%(Filename).cs</Link>
</Compile>
<Compile Include="..\Polyfill\StringInterpolation\*.cs">
<Link>Pollyfill\StringInterpolation\%(RecursiveDir)%(Filename).cs</Link>
</Compile>
<Compile Include="..\Polyfill\Trimming\*.cs">
<Link>Pollyfill\Trimming\%(RecursiveDir)%(Filename).cs</Link>
</Compile>
<Compile Include="..\Polyfill\PlatformCompatibility\*.cs">
<Link>Pollyfill\PlatformCompatibility\%(RecursiveDir)%(Filename).cs</Link>
</Compile>
</ItemGroup>
<Import Project="$(ProjectDir)..\Polyfill\Polyfill.targets" />
<Import Project="$(SolutionDir)\Polyfill\Polyfill.targets" />
<Import Project="$(SolutionDir)\TestIncludes.targets" />
</Project>
25 changes: 2 additions & 23 deletions src/ConsumeIndirect/ConsumeIndirect.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,7 @@
<PackageReference Include="System.Net.Http" Version="4.3.4" Condition="$(TargetFramework.StartsWith('net4'))" />
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.4" Condition="$(TargetFramework) == 'netstandard2.0' or $(TargetFramework) == 'netcoreapp2.0' or $(TargetFrameworkIdentifier) == '.NETFramework'" />
<Compile Include="..\Consume\*.cs" />
<Compile Include="..\Polyfill\*.cs">
<Link>Pollyfill\%(RecursiveDir)%(Filename).cs</Link>
</Compile>
<Compile Include="..\Polyfill\Nullable\*.cs">
<Link>Pollyfill\Nullable\%(RecursiveDir)%(Filename).cs</Link>
</Compile>
<Compile Include="..\Polyfill\Nullability\*.cs">
<Link>Pollyfill\Nullability\%(RecursiveDir)%(Filename).cs</Link>
</Compile>
<Compile Include="..\Polyfill\IndexRange\*.cs">
<Link>Pollyfill\IndexRange\%(RecursiveDir)%(Filename).cs</Link>
</Compile>
<Compile Include="..\Polyfill\StringInterpolation\*.cs">
<Link>Pollyfill\StringInterpolation\%(RecursiveDir)%(Filename).cs</Link>
</Compile>
<Compile Include="..\Polyfill\Trimming\*.cs">
<Link>Pollyfill\Trimming\%(RecursiveDir)%(Filename).cs</Link>
</Compile>
<Compile Include="..\Polyfill\PlatformCompatibility\*.cs">
<Link>Pollyfill\PlatformCompatibility\%(RecursiveDir)%(Filename).cs</Link>
</Compile>
<ProjectReference Include="..\Consume\Consume.csproj" />
</ItemGroup>
<Import Project="$(ProjectDir)..\Polyfill\Polyfill.targets" />
<Import Project="$(SolutionDir)\Polyfill\Polyfill.targets" />
<Import Project="$(SolutionDir)\TestIncludes.targets" />
</Project>
24 changes: 2 additions & 22 deletions src/ConsumeNoRefs/ConsumeNoRefs.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,7 @@
</PropertyGroup>
<ItemGroup>
<Compile Include="..\Consume\*.cs" />
<Compile Include="..\Polyfill\*.cs">
<Link>Pollyfill\%(RecursiveDir)%(Filename).cs</Link>
</Compile>
<Compile Include="..\Polyfill\Nullable\*.cs">
<Link>Pollyfill\Nullable\%(RecursiveDir)%(Filename).cs</Link>
</Compile>
<Compile Include="..\Polyfill\Nullability\*.cs">
<Link>Pollyfill\Nullability\%(RecursiveDir)%(Filename).cs</Link>
</Compile>
<Compile Include="..\Polyfill\IndexRange\*.cs">
<Link>Pollyfill\IndexRange\%(RecursiveDir)%(Filename).cs</Link>
</Compile>
<Compile Include="..\Polyfill\StringInterpolation\*.cs">
<Link>Pollyfill\StringInterpolation\%(RecursiveDir)%(Filename).cs</Link>
</Compile>
<Compile Include="..\Polyfill\Trimming\*.cs">
<Link>Pollyfill\Trimming\%(RecursiveDir)%(Filename).cs</Link>
</Compile>
<Compile Include="..\Polyfill\PlatformCompatibility\*.cs">
<Link>Pollyfill\PlatformCompatibility\%(RecursiveDir)%(Filename).cs</Link>
</Compile>
</ItemGroup>
<Import Project="$(ProjectDir)..\Polyfill\Polyfill.targets" />
<Import Project="$(SolutionDir)\Polyfill\Polyfill.targets" />
<Import Project="$(SolutionDir)\TestIncludes.targets" />
</Project>
21 changes: 2 additions & 19 deletions src/ConsumeTasksWithNoMemory/ConsumeTasksWithNoMemory.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,7 @@
<ItemGroup>
<!-- This project is specifically designed to guard against a mis-compile where System.Threading.Tasks.Extensions is referenced, but System.Memory is not. -->
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.4" />
<Compile Include="..\Polyfill\*.cs">
<Link>Pollyfill\%(RecursiveDir)%(Filename).cs</Link>
</Compile>
<Compile Include="..\Polyfill\Nullable\*.cs">
<Link>Pollyfill\Nullable\%(RecursiveDir)%(Filename).cs</Link>
</Compile>
<Compile Include="..\Polyfill\Nullability\*.cs">
<Link>Pollyfill\Nullability\%(RecursiveDir)%(Filename).cs</Link>
</Compile>
<Compile Include="..\Polyfill\IndexRange\*.cs">
<Link>Pollyfill\IndexRange\%(RecursiveDir)%(Filename).cs</Link>
</Compile>
<Compile Include="..\Polyfill\Trimming\*.cs">
<Link>Pollyfill\Trimming\%(RecursiveDir)%(Filename).cs</Link>
</Compile>
<Compile Include="..\Polyfill\PlatformCompatibility\*.cs">
<Link>Pollyfill\PlatformCompatibility\%(RecursiveDir)%(Filename).cs</Link>
</Compile>
</ItemGroup>
<Import Project="$(ProjectDir)..\Polyfill\Polyfill.targets" />
<Import Project="$(SolutionDir)\Polyfill\Polyfill.targets" />
<Import Project="$(SolutionDir)\TestIncludes.targets" />
</Project>
24 changes: 2 additions & 22 deletions src/NoRefsTests/NoRefsTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,6 @@
<TargetFrameworks>$(TargetFrameworks);netcoreapp3.1;net5.0;net6.0;net7.0;net8.0;net9.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\Polyfill\*.cs">
<Link>Pollyfill\%(RecursiveDir)%(Filename).cs</Link>
</Compile>
<Compile Include="..\Polyfill\Nullable\*.cs">
<Link>Pollyfill\Nullable\%(RecursiveDir)%(Filename).cs</Link>
</Compile>
<Compile Include="..\Polyfill\Nullability\*.cs">
<Link>Pollyfill\Nullability\%(RecursiveDir)%(Filename).cs</Link>
</Compile>
<Compile Include="..\Polyfill\IndexRange\*.cs">
<Link>Pollyfill\IndexRange\%(RecursiveDir)%(Filename).cs</Link>
</Compile>
<Compile Include="..\Polyfill\StringInterpolation\*.cs">
<Link>Pollyfill\StringInterpolation\%(RecursiveDir)%(Filename).cs</Link>
</Compile>
<Compile Include="..\Polyfill\Trimming\*.cs">
<Link>Pollyfill\Trimming\%(RecursiveDir)%(Filename).cs</Link>
</Compile>
<Compile Include="..\Polyfill\PlatformCompatibility\*.cs">
<Link>Pollyfill\PlatformCompatibility\%(RecursiveDir)%(Filename).cs</Link>
</Compile>
<Compile Include="..\Tests\*.cs" />
<Compile Remove="..\Tests\BuildApiTest.cs" />
<Compile Remove="..\Tests\NullabilitySync.cs" />
Expand All @@ -38,5 +17,6 @@
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="ProjectDefaults" Version="1.0.109" PrivateAssets="all" />
</ItemGroup>
<Import Project="$(ProjectDir)..\Polyfill\Polyfill.targets" />
<Import Project="$(SolutionDir)\Polyfill\Polyfill.targets" />
<Import Project="$(SolutionDir)\TestIncludes.targets" />
</Project>
2 changes: 2 additions & 0 deletions src/Polyfill/Polyfill.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
target="contentFiles/cs/netstandard2.0/Polyfill/StringInterpolation"/>
<file src="Trimming\*.cs"
target="contentFiles/cs/netstandard2.0/Polyfill/Trimming"/>
<file src="Regex\*.cs"
target="contentFiles/cs/netstandard2.0/Polyfill/Regex"/>
<file src="PlatformCompatibility\*.cs"
target="contentFiles/cs/netstandard2.0/Polyfill/PlatformCompatibility"/>
<file src="Polyfill.targets"
Expand Down
2 changes: 0 additions & 2 deletions src/Polyfill/Polyfill_StringBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Link = System.ComponentModel.DescriptionAttribute;

static partial class Polyfill
Expand Down
File renamed without changes.
File renamed without changes.
24 changes: 2 additions & 22 deletions src/PublicTests/PublicTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,6 @@
<PolyPublic>true</PolyPublic>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\Polyfill\*.cs">
<Link>Pollyfill\%(RecursiveDir)%(Filename).cs</Link>
</Compile>
<Compile Include="..\Polyfill\Nullable\*.cs">
<Link>Pollyfill\Nullable\%(RecursiveDir)%(Filename).cs</Link>
</Compile>
<Compile Include="..\Polyfill\Nullability\*.cs">
<Link>Pollyfill\Nullability\%(RecursiveDir)%(Filename).cs</Link>
</Compile>
<Compile Include="..\Polyfill\IndexRange\*.cs">
<Link>Pollyfill\IndexRange\%(RecursiveDir)%(Filename).cs</Link>
</Compile>
<Compile Include="..\Polyfill\StringInterpolation\*.cs">
<Link>Pollyfill\StringInterpolation\%(RecursiveDir)%(Filename).cs</Link>
</Compile>
<Compile Include="..\Polyfill\Trimming\*.cs">
<Link>Pollyfill\Trimming\%(RecursiveDir)%(Filename).cs</Link>
</Compile>
<Compile Include="..\Polyfill\PlatformCompatibility\*.cs">
<Link>Pollyfill\PlatformCompatibility\%(RecursiveDir)%(Filename).cs</Link>
</Compile>
<Compile Include="..\Tests\*.cs" Exclude="..\Tests\BuildApiTest.cs;..\Tests\NullabilitySync.cs" />
<PackageReference Include="NUnit" Version="3.14.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
Expand All @@ -36,5 +15,6 @@
<PackageReference Include="System.Net.Http" Version="4.3.4" Condition="$(TargetFramework.StartsWith('net4'))" />
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.4" Condition="$(TargetFramework) == 'netstandard2.0' or $(TargetFramework) == 'netcoreapp2.0' or $(TargetFrameworkIdentifier) == '.NETFramework'" />
</ItemGroup>
<Import Project="$(ProjectDir)..\Polyfill\Polyfill.targets" />
<Import Project="$(SolutionDir)\Polyfill\Polyfill.targets" />
<Import Project="$(SolutionDir)\TestIncludes.targets" />
</Project>
28 changes: 28 additions & 0 deletions src/TestIncludes.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<Project>
<ItemGroup>
<Compile Include="$(SolutionDir)Polyfill\*.cs">
<Link>Pollyfill\%(Filename).cs</Link>
</Compile>
<Compile Include="$(SolutionDir)Polyfill\Nullable\*.cs">
<Link>Pollyfill\Nullable\%(RecursiveDir)%(Filename).cs</Link>
</Compile>
<Compile Include="$(SolutionDir)Polyfill\Nullability\*.cs">
<Link>Pollyfill\Nullability\%(RecursiveDir)%(Filename).cs</Link>
</Compile>
<Compile Include="$(SolutionDir)Polyfill\IndexRange\*.cs">
<Link>Pollyfill\IndexRange\%(RecursiveDir)%(Filename).cs</Link>
</Compile>
<Compile Include="$(SolutionDir)Polyfill\StringInterpolation\*.cs">
<Link>Pollyfill\StringInterpolation\%(RecursiveDir)%(Filename).cs</Link>
</Compile>
<Compile Include="$(SolutionDir)Polyfill\Trimming\*.cs">
<Link>Pollyfill\Trimming\%(RecursiveDir)%(Filename).cs</Link>
</Compile>
<Compile Include="$(SolutionDir)Polyfill\PlatformCompatibility\*.cs">
<Link>Pollyfill\PlatformCompatibility\%(RecursiveDir)%(Filename).cs</Link>
</Compile>
<Compile Include="$(SolutionDir)Polyfill\Regex\*.cs">
<Link>Pollyfill\Regex\%(RecursiveDir)%(Filename).cs</Link>
</Compile>
</ItemGroup>
</Project>
Loading

0 comments on commit e13db67

Please sign in to comment.