Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions api_list.include.md
Original file line number Diff line number Diff line change
Expand Up @@ -840,6 +840,11 @@
* `bool IsMatch(ReadOnlySpan<char>, string)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.text.regularexpressions.regex.ismatch?view=net-11.0#system-text-regularexpressions-regex-ismatch(system-readonlyspan((system-char))-system-string))


#### RuntimeFeature

* `IsMultithreadingSupported` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.runtime.compilerservices.runtimefeature.ismultithreadingsupported?view=net-11.0)


#### SByte

* `bool TryFormat(Span<byte>, int, ReadOnlySpan<char>, IFormatProvider?)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.sbyte.tryformat?view=net-11.0#system-sbyte-tryformat(system-span((system-byte))-system-int32@-system-readonlyspan((system-char))-system-iformatprovider))
Expand Down
7 changes: 7 additions & 0 deletions src/Consume/Consume.cs
Original file line number Diff line number Diff line change
Expand Up @@ -779,6 +779,13 @@ void Stopwatch_Methods()
elapsed = Stopwatch.GetElapsedTime(timestamp, Stopwatch.GetTimestamp());
}

#if NET471_OR_GREATER || NETCOREAPP || NETSTANDARD2_1_OR_GREATER
void RuntimeFeature_Methods()
{
var supported = RuntimeFeature.IsMultithreadingSupported;
}
#endif

void Path_Methods()
{
var relative = Path.GetRelativePath("/folder1/folder2", "/folder1/folder3");
Expand Down
19 changes: 19 additions & 0 deletions src/Polyfill/RuntimeFeaturePolyfill.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#if !NET11_0_OR_GREATER && (NET471_OR_GREATER || NETCOREAPP || NETSTANDARD2_1_OR_GREATER)

namespace Polyfills;

using System.Runtime.CompilerServices;

static partial class Polyfill
{
extension(RuntimeFeature)
{
/// <summary>
/// Gets a value that indicates whether the runtime supports multithreading.
/// </summary>
//Link: https://learn.microsoft.com/en-us/dotnet/api/system.runtime.compilerservices.runtimefeature.ismultithreadingsupported?view=net-11.0
public static bool IsMultithreadingSupported => true;
}
}

#endif
14 changes: 14 additions & 0 deletions src/Split/net10.0/RuntimeFeaturePolyfill.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// <auto-generated />
#pragma warning disable
namespace Polyfills;
using System.Runtime.CompilerServices;
static partial class Polyfill
{
extension(RuntimeFeature)
{
/// <summary>
/// Gets a value that indicates whether the runtime supports multithreading.
/// </summary>
public static bool IsMultithreadingSupported => true;
}
}
14 changes: 14 additions & 0 deletions src/Split/net471/RuntimeFeaturePolyfill.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// <auto-generated />
#pragma warning disable
namespace Polyfills;
using System.Runtime.CompilerServices;
static partial class Polyfill
{
extension(RuntimeFeature)
{
/// <summary>
/// Gets a value that indicates whether the runtime supports multithreading.
/// </summary>
public static bool IsMultithreadingSupported => true;
}
}
14 changes: 14 additions & 0 deletions src/Split/net472/RuntimeFeaturePolyfill.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// <auto-generated />
#pragma warning disable
namespace Polyfills;
using System.Runtime.CompilerServices;
static partial class Polyfill
{
extension(RuntimeFeature)
{
/// <summary>
/// Gets a value that indicates whether the runtime supports multithreading.
/// </summary>
public static bool IsMultithreadingSupported => true;
}
}
14 changes: 14 additions & 0 deletions src/Split/net48/RuntimeFeaturePolyfill.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// <auto-generated />
#pragma warning disable
namespace Polyfills;
using System.Runtime.CompilerServices;
static partial class Polyfill
{
extension(RuntimeFeature)
{
/// <summary>
/// Gets a value that indicates whether the runtime supports multithreading.
/// </summary>
public static bool IsMultithreadingSupported => true;
}
}
14 changes: 14 additions & 0 deletions src/Split/net481/RuntimeFeaturePolyfill.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// <auto-generated />
#pragma warning disable
namespace Polyfills;
using System.Runtime.CompilerServices;
static partial class Polyfill
{
extension(RuntimeFeature)
{
/// <summary>
/// Gets a value that indicates whether the runtime supports multithreading.
/// </summary>
public static bool IsMultithreadingSupported => true;
}
}
14 changes: 14 additions & 0 deletions src/Split/net5.0/RuntimeFeaturePolyfill.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// <auto-generated />
#pragma warning disable
namespace Polyfills;
using System.Runtime.CompilerServices;
static partial class Polyfill
{
extension(RuntimeFeature)
{
/// <summary>
/// Gets a value that indicates whether the runtime supports multithreading.
/// </summary>
public static bool IsMultithreadingSupported => true;
}
}
14 changes: 14 additions & 0 deletions src/Split/net6.0/RuntimeFeaturePolyfill.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// <auto-generated />
#pragma warning disable
namespace Polyfills;
using System.Runtime.CompilerServices;
static partial class Polyfill
{
extension(RuntimeFeature)
{
/// <summary>
/// Gets a value that indicates whether the runtime supports multithreading.
/// </summary>
public static bool IsMultithreadingSupported => true;
}
}
14 changes: 14 additions & 0 deletions src/Split/net7.0/RuntimeFeaturePolyfill.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// <auto-generated />
#pragma warning disable
namespace Polyfills;
using System.Runtime.CompilerServices;
static partial class Polyfill
{
extension(RuntimeFeature)
{
/// <summary>
/// Gets a value that indicates whether the runtime supports multithreading.
/// </summary>
public static bool IsMultithreadingSupported => true;
}
}
14 changes: 14 additions & 0 deletions src/Split/net8.0/RuntimeFeaturePolyfill.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// <auto-generated />
#pragma warning disable
namespace Polyfills;
using System.Runtime.CompilerServices;
static partial class Polyfill
{
extension(RuntimeFeature)
{
/// <summary>
/// Gets a value that indicates whether the runtime supports multithreading.
/// </summary>
public static bool IsMultithreadingSupported => true;
}
}
14 changes: 14 additions & 0 deletions src/Split/net9.0/RuntimeFeaturePolyfill.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// <auto-generated />
#pragma warning disable
namespace Polyfills;
using System.Runtime.CompilerServices;
static partial class Polyfill
{
extension(RuntimeFeature)
{
/// <summary>
/// Gets a value that indicates whether the runtime supports multithreading.
/// </summary>
public static bool IsMultithreadingSupported => true;
}
}
14 changes: 14 additions & 0 deletions src/Split/netcoreapp2.0/RuntimeFeaturePolyfill.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// <auto-generated />
#pragma warning disable
namespace Polyfills;
using System.Runtime.CompilerServices;
static partial class Polyfill
{
extension(RuntimeFeature)
{
/// <summary>
/// Gets a value that indicates whether the runtime supports multithreading.
/// </summary>
public static bool IsMultithreadingSupported => true;
}
}
14 changes: 14 additions & 0 deletions src/Split/netcoreapp2.1/RuntimeFeaturePolyfill.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// <auto-generated />
#pragma warning disable
namespace Polyfills;
using System.Runtime.CompilerServices;
static partial class Polyfill
{
extension(RuntimeFeature)
{
/// <summary>
/// Gets a value that indicates whether the runtime supports multithreading.
/// </summary>
public static bool IsMultithreadingSupported => true;
}
}
14 changes: 14 additions & 0 deletions src/Split/netcoreapp2.2/RuntimeFeaturePolyfill.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// <auto-generated />
#pragma warning disable
namespace Polyfills;
using System.Runtime.CompilerServices;
static partial class Polyfill
{
extension(RuntimeFeature)
{
/// <summary>
/// Gets a value that indicates whether the runtime supports multithreading.
/// </summary>
public static bool IsMultithreadingSupported => true;
}
}
14 changes: 14 additions & 0 deletions src/Split/netcoreapp3.0/RuntimeFeaturePolyfill.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// <auto-generated />
#pragma warning disable
namespace Polyfills;
using System.Runtime.CompilerServices;
static partial class Polyfill
{
extension(RuntimeFeature)
{
/// <summary>
/// Gets a value that indicates whether the runtime supports multithreading.
/// </summary>
public static bool IsMultithreadingSupported => true;
}
}
14 changes: 14 additions & 0 deletions src/Split/netcoreapp3.1/RuntimeFeaturePolyfill.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// <auto-generated />
#pragma warning disable
namespace Polyfills;
using System.Runtime.CompilerServices;
static partial class Polyfill
{
extension(RuntimeFeature)
{
/// <summary>
/// Gets a value that indicates whether the runtime supports multithreading.
/// </summary>
public static bool IsMultithreadingSupported => true;
}
}
14 changes: 14 additions & 0 deletions src/Split/netstandard2.1/RuntimeFeaturePolyfill.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// <auto-generated />
#pragma warning disable
namespace Polyfills;
using System.Runtime.CompilerServices;
static partial class Polyfill
{
extension(RuntimeFeature)
{
/// <summary>
/// Gets a value that indicates whether the runtime supports multithreading.
/// </summary>
public static bool IsMultithreadingSupported => true;
}
}
14 changes: 14 additions & 0 deletions src/Tests/PolyfillTests_RuntimeFeature.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#if NET471_OR_GREATER || NETCOREAPP || NETSTANDARD2_1_OR_GREATER

using System.Runtime.CompilerServices;

partial class PolyfillTests
{
[Test]
public async Task RuntimeFeatureIsMultithreadingSupported()
{
await Assert.That(RuntimeFeature.IsMultithreadingSupported).IsTrue();
}
}

#endif
Loading