diff --git a/apiCount.include.md b/apiCount.include.md index 96700740..9f9aacf2 100644 --- a/apiCount.include.md +++ b/apiCount.include.md @@ -1,28 +1,28 @@ -**API count: 1088** +**API count: 1091** ### Per Target Framework | Target | APIs | | -- | -- | -| `net461` | 1005 | -| `net462` | 1005 | -| `net47` | 1004 | -| `net471` | 1003 | -| `net472` | 999 | -| `net48` | 999 | -| `net481` | 999 | -| `netstandard2.0` | 1001 | -| `netstandard2.1` | 854 | -| `netcoreapp2.0` | 924 | -| `netcoreapp2.1` | 865 | -| `netcoreapp2.2` | 865 | -| `netcoreapp3.0` | 826 | -| `netcoreapp3.1` | 825 | -| `net5.0` | 697 | -| `net6.0` | 598 | -| `net7.0` | 445 | -| `net8.0` | 324 | -| `net9.0` | 230 | -| `net10.0` | 176 | +| `net461` | 1022 | +| `net462` | 1022 | +| `net47` | 1021 | +| `net471` | 1020 | +| `net472` | 1016 | +| `net48` | 1016 | +| `net481` | 1016 | +| `netstandard2.0` | 1018 | +| `netstandard2.1` | 871 | +| `netcoreapp2.0` | 941 | +| `netcoreapp2.1` | 882 | +| `netcoreapp2.2` | 882 | +| `netcoreapp3.0` | 843 | +| `netcoreapp3.1` | 842 | +| `net5.0` | 714 | +| `net6.0` | 615 | +| `net7.0` | 462 | +| `net8.0` | 341 | +| `net9.0` | 232 | +| `net10.0` | 178 | | `net11.0` | 58 | -| `uap10.0` | 991 | +| `uap10.0` | 1008 | diff --git a/api_list.include.md b/api_list.include.md index d283b4b6..d4cb1652 100644 --- a/api_list.include.md +++ b/api_list.include.md @@ -90,6 +90,16 @@ * `int PopCount()` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.collections.bitarray.popcount?view=net-11.0) +#### BitConverter + + * `ulong DoubleToUInt64Bits(double)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.bitconverter.doubletouint64bits?view=net-11.0) + * `float Int32BitsToSingle(int)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.bitconverter.int32bitstosingle?view=net-11.0) + * `int SingleToInt32Bits(float)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.bitconverter.singletoint32bits?view=net-11.0) + * `uint SingleToUInt32Bits(float)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.bitconverter.singletouint32bits?view=net-11.0) + * `float UInt32BitsToSingle(uint)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.bitconverter.uint32bitstosingle?view=net-11.0) + * `double UInt64BitsToDouble(ulong)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.bitconverter.uint64bitstodouble?view=net-11.0) + + #### Boolean * `bool TryFormat(Span, int)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.boolean.tryformat?view=net-11.0) @@ -123,7 +133,7 @@ #### Capture - * `ValueSpan` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.text.regularexpressions.capture.valuespan?view=net-11.0) + * `ReadOnlySpan ValueSpan` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.text.regularexpressions.capture.valuespan?view=net-11.0) #### Char @@ -141,8 +151,10 @@ * `bool IsBetween(char, char, char)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.char.isbetween?view=net-11.0) * `char ToLowerOrdinal(char)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.char.tolowerordinal?view=net-11.0) * Note: Derived from invariant casing, so the mapping follows the Unicode version of the running framework rather than the one net11 is built against. + * Note: Derived from invariant casing, so the mapping follows the Unicode version of the running framework rather than the one net11 is built against. * `char ToUpperOrdinal(char)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.char.toupperordinal?view=net-11.0) * Note: Derived from invariant casing, so the mapping follows the Unicode version of the running framework rather than the one net11 is built against. + * Note: Derived from invariant casing, so the mapping follows the Unicode version of the running framework rather than the one net11 is built against. #### ConcurrentBag @@ -164,6 +176,7 @@ * `bool Remove(TKey, TValue) where TKey : class where TValue : class` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.runtime.compilerservices.conditionalweaktable-2.remove?view=net-11.0#system-runtime-compilerservices-conditionalweaktable-2-remove(-0-1@)) * Note: Lookup and removal are not performed under the table lock, so the operation is not atomic with regard to concurrent mutations. + * Note: Lookup and removal are not performed under the table lock, so the operation is not atomic with regard to concurrent mutations. #### Console @@ -216,8 +229,8 @@ * `bool TryParse(string?, IFormatProvider?, DateTime)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.datetime.tryparse?view=net-11.0#system-datetime-tryparse(system-string-system-iformatprovider-system-datetime@)) * `bool TryParseExact(ReadOnlySpan, ReadOnlySpan, IFormatProvider?, DateTimeStyles, DateTime)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.datetime.tryparseexact?view=net-11.0#system-datetime-tryparseexact(system-readonlyspan((system-char))-system-readonlyspan((system-char))-system-iformatprovider-system-globalization-datetimestyles-system-datetime@)) * `bool TryParseExact(ReadOnlySpan, string, IFormatProvider?, DateTimeStyles, DateTime)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.datetime.tryparseexact?view=net-11.0#system-datetime-tryparseexact(system-readonlyspan((system-char))-system-readonlyspan((system-char))-system-iformatprovider-system-globalization-datetimestyles-system-datetime@)) - * `Microsecond` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.datetime.microsecond?view=net-11.0) - * `Nanosecond` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.datetime.nanosecond?view=net-11.0) + * `int Microsecond` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.datetime.microsecond?view=net-11.0) + * `int Nanosecond` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.datetime.nanosecond?view=net-11.0) #### DateTimeOffset @@ -232,8 +245,8 @@ * `bool TryParse(string?, IFormatProvider?, DateTimeOffset)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.datetimeoffset.tryparse?view=net-11.0#system-datetimeoffset-tryparse(system-string-system-iformatprovider-system-datetimeoffset@)) * `bool TryParseExact(ReadOnlySpan, ReadOnlySpan, IFormatProvider?, DateTimeStyles, DateTimeOffset)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.datetimeoffset.tryparseexact?view=net-11.0#system-datetimeoffset-tryparseexact(system-readonlyspan((system-char))-system-readonlyspan((system-char))-system-iformatprovider-system-globalization-datetimestyles-system-datetimeoffset@)) * `bool TryParseExact(ReadOnlySpan, string, IFormatProvider?, DateTimeStyles, DateTimeOffset)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.datetimeoffset.tryparseexact?view=net-11.0#system-datetimeoffset-tryparseexact(system-readonlyspan((system-char))-system-readonlyspan((system-char))-system-iformatprovider-system-globalization-datetimestyles-system-datetimeoffset@)) - * `Microsecond` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.datetimeoffset.microsecond?view=net-11.0) - * `Nanosecond` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.datetimeoffset.nanosecond?view=net-11.0) + * `int Microsecond` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.datetimeoffset.microsecond?view=net-11.0) + * `int Nanosecond` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.datetimeoffset.nanosecond?view=net-11.0) #### Decimal @@ -257,22 +270,28 @@ #### Delegate * `InvocationListEnumerator EnumerateInvocationList(TDelegate?) where TDelegate : Delegate` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.delegate.enumerateinvocationlist?view=net-11.0) - * `HasSingleTarget` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.delegate.hassingletarget?view=net-11.0) + * `bool HasSingleTarget` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.delegate.hassingletarget?view=net-11.0) #### Dictionary * `void EnsureCapacity(int)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.dictionary-2.ensurecapacity?view=net-11.0) * Note: No-op on older targets; the BCL grows the backing storage. + * Note: No-op on older targets; the BCL grows the backing storage. * `DictionaryAlternateLookup GetAlternateLookup() where TKey : notnull` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.dictionary-2.getalternatelookup?view=net-11.0) * Note: Lookups are O(n) on older targets; the BCL is O(1). * Note: Returns the free-standing `DictionaryAlternateLookup` rather than the BCL's nested `Dictionary.AlternateLookup`. Use `var` for cross-target code. + * Note: Lookups are O(n) on older targets; the BCL is O(1). + * Note: Returns the free-standing `DictionaryAlternateLookup` rather than the BCL's nested `Dictionary.AlternateLookup`. Use `var` for cross-target code. * `void TrimExcess(int)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.dictionary-2.trimexcess?view=net-11.0#system-collections-generic-dictionary-2-trimexcess(system-int32)) * Note: No-op on older targets; the BCL shrinks the backing storage. + * Note: No-op on older targets; the BCL shrinks the backing storage. * `void TrimExcess()` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.dictionary-2.trimexcess?view=net-11.0#system-collections-generic-dictionary-2-trimexcess) * Note: No-op on older targets; the BCL shrinks the backing storage. + * Note: No-op on older targets; the BCL shrinks the backing storage. * `bool TryGetAlternateLookup(DictionaryAlternateLookup) where TKey : notnull` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.dictionary-2.trygetalternatelookup?view=net-11.0) * Note: Lookups are O(n) on older targets; the BCL is O(1). + * Note: Lookups are O(n) on older targets; the BCL is O(1). #### DictionaryEntry @@ -303,7 +322,6 @@ #### Double - * `ulong DoubleToUInt64Bits(double)` * `bool TryFormat(Span, int, ReadOnlySpan, IFormatProvider?)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.double.tryformat?view=net-11.0#system-double-tryformat(system-span((system-byte))-system-int32@-system-readonlyspan((system-char))-system-iformatprovider)) * `bool TryFormat(Span, int, ReadOnlySpan, IFormatProvider?)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.double.tryformat?view=net-11.0#system-double-tryformat(system-span((system-char))-system-int32@-system-readonlyspan((system-char))-system-iformatprovider)) * `bool TryParse(ReadOnlySpan, double)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.double.tryparse?view=net-11.0#system-double-tryparse(system-readonlyspan((system-byte))-system-double@)) @@ -329,8 +347,9 @@ * `string GetString(ReadOnlySpan)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.text.encoding.getstring?view=net-11.0#system-text-encoding-getstring(system-readonlyspan((system-byte)))) * `bool TryGetBytes(ReadOnlySpan, Span, int)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.text.encoding.trygetbytes?view=net-11.0) * `bool TryGetChars(ReadOnlySpan, Span, int)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.text.encoding.trygetchars?view=net-11.0) - * `Latin1` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.text.encoding.latin1?view=net-11.0) - * `Preamble` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.text.encoding.preamble?view=net-11.0) + * `Encoding Latin1` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.text.encoding.latin1?view=net-11.0) + * `ReadOnlySpan Preamble` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.text.encoding.preamble?view=net-11.0) + * Note: Allocates a new array on each access, unlike the BCL property which returns a cached span. * Note: Allocates a new array on each access, unlike the BCL property which returns a cached span. @@ -358,8 +377,8 @@ #### Environment - * `ProcessId` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.environment.processid?view=net-11.0#system-environment-processid) - * `ProcessPath` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.environment.processpath?view=net-11.0#system-environment-processpath) + * `int ProcessId` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.environment.processid?view=net-11.0#system-environment-processid) + * `string? ProcessPath` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.environment.processpath?view=net-11.0#system-environment-processpath) #### EqualityComparer @@ -449,20 +468,25 @@ * `bool TryParse(ReadOnlySpan, IFormatProvider?, Guid)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.guid.tryparse?view=net-11.0#system-guid-tryparse(system-readonlyspan((system-char))-system-iformatprovider-system-guid@)) * `bool TryParse(string?, IFormatProvider?, Guid)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.guid.tryparse?view=net-11.0#system-guid-tryparse(system-string-system-iformatprovider-system-guid@)) * `bool TryParseExact(ReadOnlySpan, ReadOnlySpan, Guid)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.guid.tryparseexact?view=net-11.0#system-guid-tryparseexact(system-readonlyspan((system-char))-system-readonlyspan((system-char))-system-guid@)) - * `AllBitsSet` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.guid.allbitsset?view=net-11.0) + * `Guid AllBitsSet` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.guid.allbitsset?view=net-11.0) #### HashSet * `void EnsureCapacity(int)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.hashset-1.ensurecapacity?view=net-11.0#system-collections-generic-hashset-1-ensurecapacity(system-int32)) * Note: No-op on older targets; the BCL grows the backing storage. + * Note: No-op on older targets; the BCL grows the backing storage. * `HashSetAlternateLookup GetAlternateLookup()` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.hashset-1.getalternatelookup?view=net-11.0) * Note: Lookups are O(n) on older targets; the BCL is O(1). * Note: Returns the free-standing `HashSetAlternateLookup` rather than the BCL's nested `HashSet.AlternateLookup`. Use `var` for cross-target code. + * Note: Lookups are O(n) on older targets; the BCL is O(1). + * Note: Returns the free-standing `HashSetAlternateLookup` rather than the BCL's nested `HashSet.AlternateLookup`. Use `var` for cross-target code. * `void TrimExcess(int)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.hashset-1.trimexcess?view=net-11.0#system-collections-generic-hashset-1-trimexcess(system-int32)) * Note: No-op on older targets; the BCL shrinks the backing storage. + * Note: No-op on older targets; the BCL shrinks the backing storage. * `bool TryGetAlternateLookup(HashSetAlternateLookup)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.hashset-1.trygetalternatelookup?view=net-11.0) * Note: Lookups are O(n) on older targets; the BCL is O(1). + * Note: Lookups are O(n) on older targets; the BCL is O(1). * `bool TryGetValue(T, T)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.hashset-1.trygetvalue?view=net-11.0) @@ -604,7 +628,6 @@ #### Int32 - * `float Int32BitsToSingle(int)` * `bool TryFormat(Span, int, ReadOnlySpan, IFormatProvider?)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.int32.tryformat?view=net-11.0#system-int32-tryformat(system-span((system-byte))-system-int32@-system-readonlyspan((system-char))-system-iformatprovider)) * `bool TryFormat(Span, int, ReadOnlySpan, IFormatProvider?)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.int32.tryformat?view=net-11.0#system-int32-tryformat(system-span((system-char))-system-int32@-system-readonlyspan((system-char))-system-iformatprovider)) * `int Log10(int)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.int32.log10?view=net-11.0) @@ -633,6 +656,8 @@ #### Interlocked + * `T And(T, T) where T : struct` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.threading.interlocked.and?view=net-11.0) + * `T Or(T, T) where T : struct` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.threading.interlocked.or?view=net-11.0) #### IntPtr @@ -679,9 +704,12 @@ * `void EnsureCapacity(int)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.list-1.ensurecapacity?view=net-11.0#system-collections-generic-list-1-ensurecapacity(system-int32)) * Note: No-op on older targets; the BCL grows the backing storage. * Note: Returns void on older targets; the BCL returns int (the new capacity). + * Note: No-op on older targets; the BCL grows the backing storage. + * Note: Returns void on older targets; the BCL returns int (the new capacity). * `void InsertRange(int, ReadOnlySpan)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.collectionextensions.insertrange?view=net-11.0) * `void TrimExcess()` * Note: No-op on older targets; the BCL shrinks the backing storage. + * Note: No-op on older targets; the BCL shrinks the backing storage. #### Math @@ -813,6 +841,7 @@ * `Task<(byte[] StandardOutput, byte[] StandardError)> ReadAllBytesAsync(CancellationToken)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.process.readallbytesasync?view=net-11.0) * `IEnumerable ReadAllLines(TimeSpan?)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.process.readalllines?view=net-11.0) * Note: The timeout is measured from the point enumeration starts, since the returned sequence is lazy. + * Note: The timeout is measured from the point enumeration starts, since the returned sequence is lazy. * `IAsyncEnumerable ReadAllLinesAsync(CancellationToken)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.process.readalllinesasync?view=net-11.0) * `(string StandardOutput, string StandardError) ReadAllText(TimeSpan?)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.process.readalltext?view=net-11.0) * `Task<(string StandardOutput, string StandardError)> ReadAllTextAsync(CancellationToken)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.process.readalltextasync?view=net-11.0) @@ -841,6 +870,11 @@ * `bool TryGetProcessById(int, Process?)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.process.trygetprocessbyid?view=net-11.0) +#### ProcessStartInfo + + * `Collection ArgumentList` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.processstartinfo.argumentlist?view=net-11.0) + + #### PropertyInfo * `NullabilityState GetNullability()` @@ -852,8 +886,10 @@ * `void EnsureCapacity(int)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.queue-1.ensurecapacity?view=net-11.0#system-collections-generic-queue-1-ensurecapacity(system-int32)) * Note: No-op on older targets; the BCL grows the backing storage. + * Note: No-op on older targets; the BCL grows the backing storage. * `void TrimExcess(int)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.queue-1.trimexcess?view=net-11.0#system-collections-generic-queue-1-trimexcess(system-int32)) * Note: No-op on older targets; the BCL shrinks the backing storage. + * Note: No-op on older targets; the BCL shrinks the backing storage. * `bool TryDequeue(T)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.queue-1.trydequeue?view=net-11.0) * `bool TryPeek(T)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.queue-1.trypeek?view=net-11.0) @@ -873,7 +909,7 @@ * `float NextSingle()` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.random.nextsingle?view=net-11.0) * `void Shuffle(Span)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.random.nextbytes?view=net-11.0#system-random-nextbytes(system-span((system-byte)))) * `void Shuffle(T[])` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.random.nextbytes?view=net-11.0#system-random-nextbytes(system-span((system-byte)))) - * `Shared` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.random.shared?view=net-11.0) + * `Random Shared` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.random.shared?view=net-11.0) #### RandomNumberGenerator @@ -909,8 +945,10 @@ * `bool StartsWith(string, StringComparison)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.memoryextensions.startswith?view=net-11.0#system-memoryextensions-startswith-1(system-readonlyspan((-0))-system-readonlyspan((-0)))) * `int ToLowerOrdinal(Span)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.memoryextensions.tolowerordinal?view=net-11.0) * Note: Derived from invariant casing, so the mapping follows the Unicode version of the running framework rather than the one net11 is built against. + * Note: Derived from invariant casing, so the mapping follows the Unicode version of the running framework rather than the one net11 is built against. * `int ToUpperOrdinal(Span)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.memoryextensions.toupperordinal?view=net-11.0) * Note: Derived from invariant casing, so the mapping follows the Unicode version of the running framework rather than the one net11 is built against. + * Note: Derived from invariant casing, so the mapping follows the Unicode version of the running framework rather than the one net11 is built against. * `bool TryNormalize(Span, int, NormalizationForm)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.stringnormalizationextensions.trynormalize?view=net-11.0#system-stringnormalizationextensions-trynormalize(system-readonlyspan((system-char))-system-span((system-char))-system-int32@-system-text-normalizationform)) @@ -985,13 +1023,15 @@ * `bool Equals(Rune, StringComparison)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.text.rune.equals?view=net-11.0#system-text-rune-equals(system-text-rune-system-stringcomparison)) * `Rune ToLowerOrdinal(Rune)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.text.rune.tolowerordinal?view=net-11.0) * Note: Derived from invariant casing, so the mapping follows the Unicode version of the running framework rather than the one net11 is built against. + * Note: Derived from invariant casing, so the mapping follows the Unicode version of the running framework rather than the one net11 is built against. * `Rune ToUpperOrdinal(Rune)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.text.rune.toupperordinal?view=net-11.0) * Note: Derived from invariant casing, so the mapping follows the Unicode version of the running framework rather than the one net11 is built against. + * Note: Derived from invariant casing, so the mapping follows the Unicode version of the running framework rather than the one net11 is built against. #### RuntimeFeature - * `IsMultithreadingSupported` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.runtime.compilerservices.runtimefeature.ismultithreadingsupported?view=net-11.0) + * `bool IsMultithreadingSupported` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.runtime.compilerservices.runtimefeature.ismultithreadingsupported?view=net-11.0) #### SByte @@ -1058,8 +1098,6 @@ #### Single - * `int SingleToInt32Bits(float)` - * `uint SingleToUInt32Bits(float)` * `bool TryFormat(Span, int, ReadOnlySpan, IFormatProvider?)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.single.tryformat?view=net-11.0#system-single-tryformat(system-span((system-byte))-system-int32@-system-readonlyspan((system-char))-system-iformatprovider)) * `bool TryFormat(Span, int, ReadOnlySpan, IFormatProvider?)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.single.tryformat?view=net-11.0#system-single-tryformat(system-span((system-char))-system-int32@-system-readonlyspan((system-char))-system-iformatprovider)) * `bool TryParse(ReadOnlySpan, float)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.single.tryparse?view=net-11.0#system-single-tryparse(system-readonlyspan((system-byte))-system-single@)) @@ -1129,8 +1167,10 @@ * `void EnsureCapacity(int)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.stack-1.ensurecapacity?view=net-11.0) * Note: No-op on older targets; the BCL grows the backing storage. + * Note: No-op on older targets; the BCL grows the backing storage. * `void TrimExcess(int)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.stack-1.trimexcess?view=net-11.0#system-collections-generic-stack-1-trimexcess(system-int32)) * Note: No-op on older targets; the BCL shrinks the backing storage. + * Note: No-op on older targets; the BCL shrinks the backing storage. * `bool TryPeek(T)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.stack-1.trypeek?view=net-11.0) * `bool TryPop(T)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.stack-1.trypop?view=net-11.0) @@ -1182,8 +1222,10 @@ * `bool StartsWith(char)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.string.startswith?view=net-11.0#system-string-startswith(system-char)) * `string ToLowerOrdinal()` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.string.tolowerordinal?view=net-11.0) * Note: Derived from invariant casing, so the mapping follows the Unicode version of the running framework rather than the one net11 is built against. + * Note: Derived from invariant casing, so the mapping follows the Unicode version of the running framework rather than the one net11 is built against. * `string ToUpperOrdinal()` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.string.toupperordinal?view=net-11.0) * Note: Derived from invariant casing, so the mapping follows the Unicode version of the running framework rather than the one net11 is built against. + * Note: Derived from invariant casing, so the mapping follows the Unicode version of the running framework rather than the one net11 is built against. * `bool TryCopyTo(Span)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.string.trycopyto?view=net-11.0) * `string Concat(ReadOnlySpan)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.string.concat?view=net-11.0#system-string-concat(system-readonlyspan((system-object)))) * `string Concat(ReadOnlySpan)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.string.concat?view=net-11.0#system-string-concat(system-readonlyspan((system-string)))) @@ -1221,6 +1263,7 @@ * `void CopyTo(int, Span, int)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.text.stringbuilder.copyto?view=net-11.0#system-text-stringbuilder-copyto(system-int32-system-span((system-char))-system-int32)) * `StringBuilderRuneEnumerator EnumerateRunes()` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.text.stringbuilder.enumeraterunes?view=net-11.0) * Note: Enumerates over a snapshot of the content taken when enumeration starts, so changes made to the StringBuilder while enumerating are not observed. + * Note: Enumerates over a snapshot of the content taken when enumeration starts, so changes made to the StringBuilder while enumerating are not observed. * `bool Equals(ReadOnlySpan)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.text.stringbuilder.equals?view=net-11.0#system-text-stringbuilder-equals(system-readonlyspan((system-char)))) * `ChunkEnumerator GetChunks()` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.text.stringbuilder.getchunks?view=net-11.0) * `Rune GetRuneAt(int)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.text.stringbuilder.getruneat?view=net-11.0) @@ -1313,37 +1356,52 @@ * `TimeSpan FromMilliseconds(long, long)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.timespan.frommilliseconds?view=net-11.0#system-timespan-frommilliseconds(system-int64-system-int64)) * `TimeSpan FromMinutes(int, int, int, int)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.timespan.fromminutes?view=net-11.0#system-timespan-fromminutes(system-int32-system-int32-system-int32-system-int32)) * `TimeSpan FromSeconds(long, long, long)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.timespan.fromseconds?view=net-11.0#system-timespan-fromseconds(system-int64-system-int64-system-int64)) - * `HoursPerDay` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.timespan.hoursperday?view=net-11.0) + * `int HoursPerDay` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.timespan.hoursperday?view=net-11.0) + * Note: A property rather than a const, since extension members cannot declare constants, so it cannot be used in a constant expression. + * Note: A property rather than a const, since extension members cannot declare constants, so it cannot be used in a constant expression. + * `int Microseconds` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.timespan.microseconds?view=net-11.0) + * `long MicrosecondsPerDay` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.timespan.microsecondsperday?view=net-11.0) + * Note: A property rather than a const, since extension members cannot declare constants, so it cannot be used in a constant expression. + * Note: A property rather than a const, since extension members cannot declare constants, so it cannot be used in a constant expression. + * `long MicrosecondsPerHour` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.timespan.microsecondsperhour?view=net-11.0) + * Note: A property rather than a const, since extension members cannot declare constants, so it cannot be used in a constant expression. + * Note: A property rather than a const, since extension members cannot declare constants, so it cannot be used in a constant expression. + * `long MicrosecondsPerMillisecond` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.timespan.microsecondspermillisecond?view=net-11.0) * Note: A property rather than a const, since extension members cannot declare constants, so it cannot be used in a constant expression. - * `Microseconds` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.timespan.microseconds?view=net-11.0) - * `MicrosecondsPerDay` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.timespan.microsecondsperday?view=net-11.0) * Note: A property rather than a const, since extension members cannot declare constants, so it cannot be used in a constant expression. - * `MicrosecondsPerHour` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.timespan.microsecondsperhour?view=net-11.0) + * `long MicrosecondsPerMinute` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.timespan.microsecondsperminute?view=net-11.0) * Note: A property rather than a const, since extension members cannot declare constants, so it cannot be used in a constant expression. - * `MicrosecondsPerMillisecond` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.timespan.microsecondspermillisecond?view=net-11.0) * Note: A property rather than a const, since extension members cannot declare constants, so it cannot be used in a constant expression. - * `MicrosecondsPerMinute` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.timespan.microsecondsperminute?view=net-11.0) + * `long MicrosecondsPerSecond` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.timespan.microsecondspersecond?view=net-11.0) * Note: A property rather than a const, since extension members cannot declare constants, so it cannot be used in a constant expression. - * `MicrosecondsPerSecond` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.timespan.microsecondspersecond?view=net-11.0) * Note: A property rather than a const, since extension members cannot declare constants, so it cannot be used in a constant expression. - * `MillisecondsPerDay` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.timespan.millisecondsperday?view=net-11.0) + * `long MillisecondsPerDay` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.timespan.millisecondsperday?view=net-11.0) * Note: A property rather than a const, since extension members cannot declare constants, so it cannot be used in a constant expression. - * `MillisecondsPerHour` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.timespan.millisecondsperhour?view=net-11.0) * Note: A property rather than a const, since extension members cannot declare constants, so it cannot be used in a constant expression. - * `MillisecondsPerMinute` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.timespan.millisecondsperminute?view=net-11.0) + * `long MillisecondsPerHour` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.timespan.millisecondsperhour?view=net-11.0) * Note: A property rather than a const, since extension members cannot declare constants, so it cannot be used in a constant expression. - * `MillisecondsPerSecond` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.timespan.millisecondspersecond?view=net-11.0) * Note: A property rather than a const, since extension members cannot declare constants, so it cannot be used in a constant expression. - * `MinutesPerDay` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.timespan.minutesperday?view=net-11.0) + * `long MillisecondsPerMinute` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.timespan.millisecondsperminute?view=net-11.0) * Note: A property rather than a const, since extension members cannot declare constants, so it cannot be used in a constant expression. - * `MinutesPerHour` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.timespan.minutesperhour?view=net-11.0) * Note: A property rather than a const, since extension members cannot declare constants, so it cannot be used in a constant expression. - * `Nanoseconds` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.timespan.nanoseconds?view=net-11.0) - * `SecondsPerDay` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.timespan.secondsperday?view=net-11.0) + * `long MillisecondsPerSecond` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.timespan.millisecondspersecond?view=net-11.0) * Note: A property rather than a const, since extension members cannot declare constants, so it cannot be used in a constant expression. - * `SecondsPerHour` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.timespan.secondsperhour?view=net-11.0) * Note: A property rather than a const, since extension members cannot declare constants, so it cannot be used in a constant expression. - * `SecondsPerMinute` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.timespan.secondsperminute?view=net-11.0) + * `long MinutesPerDay` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.timespan.minutesperday?view=net-11.0) + * Note: A property rather than a const, since extension members cannot declare constants, so it cannot be used in a constant expression. + * Note: A property rather than a const, since extension members cannot declare constants, so it cannot be used in a constant expression. + * `long MinutesPerHour` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.timespan.minutesperhour?view=net-11.0) + * Note: A property rather than a const, since extension members cannot declare constants, so it cannot be used in a constant expression. + * Note: A property rather than a const, since extension members cannot declare constants, so it cannot be used in a constant expression. + * `int Nanoseconds` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.timespan.nanoseconds?view=net-11.0) + * `long SecondsPerDay` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.timespan.secondsperday?view=net-11.0) + * Note: A property rather than a const, since extension members cannot declare constants, so it cannot be used in a constant expression. + * Note: A property rather than a const, since extension members cannot declare constants, so it cannot be used in a constant expression. + * `long SecondsPerHour` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.timespan.secondsperhour?view=net-11.0) + * Note: A property rather than a const, since extension members cannot declare constants, so it cannot be used in a constant expression. + * Note: A property rather than a const, since extension members cannot declare constants, so it cannot be used in a constant expression. + * `long SecondsPerMinute` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.timespan.secondsperminute?view=net-11.0) + * Note: A property rather than a const, since extension members cannot declare constants, so it cannot be used in a constant expression. * Note: A property rather than a const, since extension members cannot declare constants, so it cannot be used in a constant expression. @@ -1356,7 +1414,7 @@ * `bool IsAssignableTo(Type?)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.type.isassignableto?view=net-11.0) * `bool IsAssignableTo()` * `Type? GetNullableUnderlyingType()` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.type.getnullableunderlyingtype?view=net-11.0) - * `IsGenericMethodParameter` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.type.isgenericmethodparameter?view=net-11.0) + * `bool IsGenericMethodParameter` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.type.isgenericmethodparameter?view=net-11.0) #### UdpClient @@ -1393,7 +1451,6 @@ * `bool TryFormat(Span, int, ReadOnlySpan, IFormatProvider?)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.uint32.tryformat?view=net-11.0#system-uint32-tryformat(system-span((system-byte))-system-int32@-system-readonlyspan((system-char))-system-iformatprovider)) * `bool TryFormat(Span, int, ReadOnlySpan, IFormatProvider?)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.uint32.tryformat?view=net-11.0#system-uint32-tryformat(system-span((system-char))-system-int32@-system-readonlyspan((system-char))-system-iformatprovider)) - * `float UInt32BitsToSingle(uint)` * `uint Log10(uint)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.uint32.log10?view=net-11.0) * `bool TryParse(ReadOnlySpan, IFormatProvider?, uint)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.uint32.tryparse?view=net-11.0#system-uint32-tryparse(system-readonlyspan((system-byte))-system-iformatprovider-system-uint32@)) * `bool TryParse(ReadOnlySpan, NumberStyles, IFormatProvider?, uint)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.uint32.tryparse?view=net-11.0#system-uint32-tryparse(system-readonlyspan((system-byte))-system-globalization-numberstyles-system-iformatprovider-system-uint32@)) @@ -1408,7 +1465,6 @@ * `bool TryFormat(Span, int, ReadOnlySpan, IFormatProvider?)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.uint64.tryformat?view=net-11.0#system-uint64-tryformat(system-span((system-byte))-system-int32@-system-readonlyspan((system-char))-system-iformatprovider)) * `bool TryFormat(Span, int, ReadOnlySpan, IFormatProvider?)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.uint64.tryformat?view=net-11.0#system-uint64-tryformat(system-span((system-char))-system-int32@-system-readonlyspan((system-char))-system-iformatprovider)) - * `double UInt64BitsToDouble(ulong)` * `ulong Log10(ulong)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.uint64.log10?view=net-11.0) * `bool TryParse(ReadOnlySpan, IFormatProvider?, ulong)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.uint64.tryparse?view=net-11.0#system-uint64-tryparse(system-readonlyspan((system-byte))-system-iformatprovider-system-uint64@)) * `bool TryParse(ReadOnlySpan, NumberStyles, IFormatProvider?, ulong)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.uint64.tryparse?view=net-11.0#system-uint64-tryparse(system-readonlyspan((system-byte))-system-globalization-numberstyles-system-iformatprovider-system-uint64@)) @@ -1435,7 +1491,7 @@ #### Uri - * `UriSchemeData` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.uri.urischemedata?view=net-11.0) + * `string UriSchemeData` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.uri.urischemedata?view=net-11.0) #### Utf8 @@ -1445,7 +1501,7 @@ #### ValueTask - * `CompletedTask` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.valuetask.completedtask?view=net-11.0) + * `ValueTask CompletedTask` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.valuetask.completedtask?view=net-11.0) #### XDocument @@ -1490,7 +1546,7 @@ * `Stream Open(FileAccess)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.io.compression.ziparchiveentry.open?view=net-11.0) * `Task OpenAsync(CancellationToken)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.io.compression.ziparchiveentry.openasync?view=net-11.0#system-io-compression-ziparchiveentry-openasync(system-threading-cancellationtoken)) * `ValueTask OpenAsync(FileAccess, CancellationToken)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.io.compression.ziparchiveentry.openasync?view=net-11.0#system-io-compression-ziparchiveentry-openasync(system-io-fileaccess-system-threading-cancellationtoken)) - * `ExternalAttributes` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.io.compression.ziparchiveentry.externalattributes?view=net-11.0) + * `int ExternalAttributes` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.io.compression.ziparchiveentry.externalattributes?view=net-11.0) #### ZipFile @@ -1573,8 +1629,10 @@ * `Span AsSpan(List?)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.collectionsmarshal.asspan?view=net-11.0) * Note: Reads the list's private backing array via reflection on this target. + * Note: Reads the list's private backing array via reflection on this target. * `void SetCount(List, int)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.collectionsmarshal.setcount?view=net-11.0) * Note: When growing, new elements are default(T); the BCL exposes uninitialized data. + * Note: When growing, new elements are default(T); the BCL exposes uninitialized data. #### BitOperations @@ -1591,8 +1649,10 @@ * `bool FixedTimeEquals(ReadOnlySpan, byte)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.security.cryptography.cryptographicoperations.fixedtimeequals?view=net-11.0#system-security-cryptography-cryptographicoperations-fixedtimeequals(system-readonlyspan((system-byte))-system-byte)) * Note: Best-effort constant-time comparison; a managed loop cannot offer the same guarantees as the BCL intrinsic. + * Note: Best-effort constant-time comparison; a managed loop cannot offer the same guarantees as the BCL intrinsic. * `bool FixedTimeEquals(ReadOnlySpan, ReadOnlySpan)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.security.cryptography.cryptographicoperations.fixedtimeequals?view=net-11.0#system-security-cryptography-cryptographicoperations-fixedtimeequals(system-readonlyspan((system-byte))-system-readonlyspan((system-byte)))) * Note: Best-effort constant-time comparison; a managed loop cannot offer the same guarantees as the BCL intrinsic. + * Note: Best-effort constant-time comparison; a managed loop cannot offer the same guarantees as the BCL intrinsic. * `byte[] HashData(HashAlgorithmName, byte[])` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.security.cryptography.cryptographicoperations.hashdata?view=net-11.0#system-security-cryptography-cryptographicoperations-hashdata(system-security-cryptography-hashalgorithmname-system-byte())) * `int HashData(HashAlgorithmName, ReadOnlySpan, Span)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.security.cryptography.cryptographicoperations.hashdata?view=net-11.0#system-security-cryptography-cryptographicoperations-hashdata(system-security-cryptography-hashalgorithmname-system-readonlyspan((system-byte))-system-span((system-byte)))) * `byte[] HashData(HashAlgorithmName, ReadOnlySpan)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.security.cryptography.cryptographicoperations.hashdata?view=net-11.0#system-security-cryptography-cryptographicoperations-hashdata(system-security-cryptography-hashalgorithmname-system-readonlyspan((system-byte)))) @@ -1619,6 +1679,7 @@ * `ValueTask VerifyHmacAsync(HashAlgorithmName, ReadOnlyMemory, Stream, ReadOnlyMemory, CancellationToken)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.security.cryptography.cryptographicoperations.verifyhmacasync?view=net-11.0#system-security-cryptography-cryptographicoperations-verifyhmacasync(system-security-cryptography-hashalgorithmname-system-readonlymemory((system-byte))-system-io-stream-system-readonlymemory((system-byte))-system-threading-cancellationtoken)) * `void ZeroMemory(Span)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.security.cryptography.cryptographicoperations.zeromemory?view=net-11.0) * Note: Best-effort zeroing; unlike the BCL intrinsic the JIT may elide the clear if the buffer is not observed afterwards. + * Note: Best-effort zeroing; unlike the BCL intrinsic the JIT may elide the clear if the buffer is not observed afterwards. #### Utf16 diff --git a/assemblySize.include.md b/assemblySize.include.md index 22ffe1c0..76f12345 100644 --- a/assemblySize.include.md +++ b/assemblySize.include.md @@ -2,24 +2,24 @@ | | Empty Assembly | With Polyfill | Diff | Ensure | ArgumentExceptions | StringInterpolation | Nullability | |----------------|----------------|---------------|-----------|-----------|--------------------|---------------------|-------------| -| netstandard2.0 | 8.0KB | 368.0KB | +360.0KB | +7.5KB | +5.5KB | +7.5KB | +12.0KB | -| netstandard2.1 | 8.5KB | 322.0KB | +313.5KB | +9.0KB | +6.5KB | +9.0KB | +13.5KB | -| net461 | 8.5KB | 365.5KB | +357.0KB | +9.0KB | +6.5KB | +9.0KB | +13.5KB | -| net462 | 7.0KB | 370.5KB | +363.5KB | +7.5KB | +6.5KB | +9.0KB | +12.0KB | -| net47 | 7.0KB | 370.0KB | +363.0KB | +7.5KB | +6.5KB | +9.5KB | +12.0KB | -| net471 | 8.5KB | 368.0KB | +359.5KB | +8.5KB | +6.5KB | +9.0KB | +13.5KB | -| net472 | 8.5KB | 366.5KB | +358.0KB | +9.0KB | +6.5KB | +9.0KB | +13.5KB | -| net48 | 8.5KB | 366.5KB | +358.0KB | +9.0KB | +6.5KB | +9.0KB | +13.5KB | -| net481 | 8.5KB | 366.5KB | +358.0KB | +9.0KB | +6.5KB | +9.0KB | +13.5KB | -| netcoreapp2.0 | 9.0KB | 345.5KB | +336.5KB | +9.0KB | +6.5KB | +9.0KB | +13.5KB | -| netcoreapp2.1 | 9.0KB | 325.5KB | +316.5KB | +9.0KB | +6.5KB | +9.0KB | +14.0KB | -| netcoreapp2.2 | 9.0KB | 325.5KB | +316.5KB | +9.0KB | +6.5KB | +9.0KB | +14.0KB | -| netcoreapp3.0 | 9.5KB | 321.5KB | +312.0KB | +9.0KB | +6.5KB | +9.0KB | +13.5KB | -| netcoreapp3.1 | 9.5KB | 320.0KB | +310.5KB | +8.5KB | +6.5KB | +9.0KB | +13.5KB | -| net5.0 | 9.5KB | 284.0KB | +274.5KB | +9.0KB | +6.5KB | +9.0KB | +13.5KB | -| net6.0 | 10.0KB | 225.5KB | +215.5KB | +10.0KB | +7.0KB | +512bytes | +3.5KB | -| net7.0 | 10.0KB | 191.0KB | +181.0KB | +9.0KB | +5.5KB | +512bytes | +3.0KB | -| net8.0 | 9.5KB | 161.0KB | +151.5KB | +8.5KB | | +512bytes | +3.0KB | +| netstandard2.0 | 8.0KB | 368.0KB | +360.0KB | +9.0KB | +6.5KB | +9.0KB | +13.5KB | +| netstandard2.1 | 8.5KB | 323.5KB | +315.0KB | +9.0KB | +6.5KB | +9.0KB | +13.5KB | +| net461 | 8.5KB | 367.0KB | +358.5KB | +8.5KB | +6.5KB | +9.0KB | +13.0KB | +| net462 | 7.0KB | 372.0KB | +365.0KB | +7.5KB | +6.5KB | +7.5KB | +12.0KB | +| net47 | 7.0KB | 371.5KB | +364.5KB | +7.5KB | +6.5KB | +9.0KB | +12.0KB | +| net471 | 8.5KB | 369.5KB | +361.0KB | +8.5KB | +6.5KB | +9.0KB | +13.0KB | +| net472 | 8.5KB | 368.0KB | +359.5KB | +9.0KB | +6.5KB | +9.0KB | +13.5KB | +| net48 | 8.5KB | 368.0KB | +359.5KB | +9.0KB | +6.5KB | +9.0KB | +13.5KB | +| net481 | 8.5KB | 368.0KB | +359.5KB | +9.0KB | +6.5KB | +9.0KB | +13.5KB | +| netcoreapp2.0 | 9.0KB | 347.0KB | +338.0KB | +9.0KB | +6.5KB | +9.0KB | +13.5KB | +| netcoreapp2.1 | 9.0KB | 327.0KB | +318.0KB | +9.0KB | +6.5KB | +9.0KB | +13.5KB | +| netcoreapp2.2 | 9.0KB | 327.0KB | +318.0KB | +9.0KB | +6.5KB | +9.0KB | +13.5KB | +| netcoreapp3.0 | 9.5KB | 323.0KB | +313.5KB | +9.0KB | +6.5KB | +9.0KB | +13.5KB | +| netcoreapp3.1 | 9.5KB | 321.0KB | +311.5KB | +9.0KB | +6.5KB | +9.5KB | +14.0KB | +| net5.0 | 9.5KB | 285.5KB | +276.0KB | +9.0KB | +6.5KB | +9.0KB | +13.5KB | +| net6.0 | 10.0KB | 227.0KB | +217.0KB | +9.5KB | +6.5KB | +512bytes | +3.5KB | +| net7.0 | 10.0KB | 192.0KB | +182.0KB | +9.5KB | +6.0KB | +1.0KB | +3.5KB | +| net8.0 | 9.5KB | 162.5KB | +153.0KB | +8.5KB | | +512bytes | +3.0KB | | net9.0 | 9.5KB | 114.0KB | +104.5KB | +8.5KB | | +512bytes | +3.5KB | | net10.0 | 10.0KB | 92.0KB | +82.0KB | +8.5KB | | +512bytes | +3.5KB | | net11.0 | 10.0KB | 21.0KB | +11.0KB | +9.0KB | | +512bytes | +3.5KB | @@ -29,24 +29,24 @@ | | Empty Assembly | With Polyfill | Diff | Ensure | ArgumentExceptions | StringInterpolation | Nullability | |----------------|----------------|---------------|-----------|-----------|--------------------|---------------------|-------------| -| netstandard2.0 | 8.0KB | 539.5KB | +531.5KB | +15.2KB | +7.2KB | +12.4KB | +17.4KB | -| netstandard2.1 | 8.5KB | 466.9KB | +458.4KB | +16.7KB | +8.2KB | +13.9KB | +18.9KB | -| net461 | 8.5KB | 538.1KB | +529.6KB | +16.7KB | +8.2KB | +13.9KB | +18.9KB | -| net462 | 7.0KB | 543.1KB | +536.1KB | +15.2KB | +8.2KB | +13.9KB | +17.4KB | -| net47 | 7.0KB | 542.3KB | +535.3KB | +15.2KB | +8.2KB | +14.4KB | +17.4KB | -| net471 | 8.5KB | 540.0KB | +531.5KB | +16.2KB | +8.2KB | +13.9KB | +18.9KB | -| net472 | 8.5KB | 537.4KB | +528.9KB | +16.7KB | +8.2KB | +13.9KB | +18.9KB | -| net48 | 8.5KB | 537.4KB | +528.9KB | +16.7KB | +8.2KB | +13.9KB | +18.9KB | -| net481 | 8.5KB | 537.4KB | +528.9KB | +16.7KB | +8.2KB | +13.9KB | +18.9KB | -| netcoreapp2.0 | 9.0KB | 506.5KB | +497.5KB | +16.7KB | +8.2KB | +13.9KB | +18.9KB | -| netcoreapp2.1 | 9.0KB | 474.1KB | +465.1KB | +16.7KB | +8.2KB | +13.9KB | +19.4KB | -| netcoreapp2.2 | 9.0KB | 474.1KB | +465.1KB | +16.7KB | +8.2KB | +13.9KB | +19.4KB | -| netcoreapp3.0 | 9.5KB | 463.4KB | +453.9KB | +16.7KB | +8.2KB | +13.9KB | +18.9KB | -| netcoreapp3.1 | 9.5KB | 461.9KB | +452.4KB | +16.2KB | +8.2KB | +13.9KB | +18.9KB | -| net5.0 | 9.5KB | 407.8KB | +398.3KB | +16.7KB | +8.2KB | +13.9KB | +18.9KB | -| net6.0 | 10.0KB | 329.3KB | +319.3KB | +17.7KB | +8.7KB | +1.1KB | +4.2KB | -| net7.0 | 10.0KB | 276.5KB | +266.5KB | +16.6KB | +6.9KB | +1.1KB | +3.7KB | -| net8.0 | 9.5KB | 232.7KB | +223.2KB | +16.0KB | +299bytes | +1.1KB | +3.7KB | +| netstandard2.0 | 8.0KB | 539.7KB | +531.7KB | +16.7KB | +8.2KB | +13.9KB | +18.9KB | +| netstandard2.1 | 8.5KB | 468.6KB | +460.1KB | +16.7KB | +8.2KB | +13.9KB | +18.9KB | +| net461 | 8.5KB | 539.8KB | +531.3KB | +16.2KB | +8.2KB | +13.9KB | +18.4KB | +| net462 | 7.0KB | 544.8KB | +537.8KB | +15.2KB | +8.2KB | +12.4KB | +17.4KB | +| net47 | 7.0KB | 544.0KB | +537.0KB | +15.2KB | +8.2KB | +13.9KB | +17.4KB | +| net471 | 8.5KB | 541.7KB | +533.2KB | +16.2KB | +8.2KB | +13.9KB | +18.4KB | +| net472 | 8.5KB | 539.1KB | +530.6KB | +16.7KB | +8.2KB | +13.9KB | +18.9KB | +| net48 | 8.5KB | 539.1KB | +530.6KB | +16.7KB | +8.2KB | +13.9KB | +18.9KB | +| net481 | 8.5KB | 539.1KB | +530.6KB | +16.7KB | +8.2KB | +13.9KB | +18.9KB | +| netcoreapp2.0 | 9.0KB | 508.2KB | +499.2KB | +16.7KB | +8.2KB | +13.9KB | +18.9KB | +| netcoreapp2.1 | 9.0KB | 475.8KB | +466.8KB | +16.7KB | +8.2KB | +13.9KB | +18.9KB | +| netcoreapp2.2 | 9.0KB | 475.8KB | +466.8KB | +16.7KB | +8.2KB | +13.9KB | +18.9KB | +| netcoreapp3.0 | 9.5KB | 465.1KB | +455.6KB | +16.7KB | +8.2KB | +13.9KB | +18.9KB | +| netcoreapp3.1 | 9.5KB | 463.1KB | +453.6KB | +16.7KB | +8.2KB | +14.4KB | +19.4KB | +| net5.0 | 9.5KB | 409.5KB | +400.0KB | +16.7KB | +8.2KB | +13.9KB | +18.9KB | +| net6.0 | 10.0KB | 331.0KB | +321.0KB | +17.2KB | +8.2KB | +1.1KB | +4.2KB | +| net7.0 | 10.0KB | 277.7KB | +267.7KB | +17.1KB | +7.4KB | +1.6KB | +4.2KB | +| net8.0 | 9.5KB | 234.4KB | +224.9KB | +16.0KB | +299bytes | +1.1KB | +3.7KB | | net9.0 | 9.5KB | 164.6KB | +155.1KB | +16.0KB | | +1.1KB | +4.2KB | | net10.0 | 10.0KB | 133.9KB | +123.9KB | +16.0KB | | +1.1KB | +4.2KB | | net11.0 | 10.0KB | 30.9KB | +20.9KB | +16.5KB | | +1.1KB | +4.2KB | diff --git a/claude.md b/claude.md index 8dc053e2..aaef62e8 100644 --- a/claude.md +++ b/claude.md @@ -69,6 +69,8 @@ Polyfill uses extensive `#if` directives. Key constants: **Important constraints:** - Each `*Polyfill.cs` file must contain exactly **one top-level type** (the `Polyfill` partial class). Helper classes must be **nested** inside `Polyfill`, otherwise `ReadMethodsForFiles` in `BuildApiTest` will throw. - The filename of static polyfill files directly determines the `api_list.include.md` section header: `{TypeName}Polyfill.cs` → `#### {TypeName}`. For example, `FilePolyfill.cs` → `#### File`. Choose filenames to match the type being extended. +- For `Polyfill_{TypeName}.cs` files the section is derived from the members themselves: an `extension(Type)` block puts its members under `#### Type`, and a classic `this`-parameter extension method goes under the type of that parameter. Public properties are only listed when they sit inside an `extension(Type)` block. +- A new preprocessor symbol used to gate polyfill source (e.g. `FeatureUnsafe`) must be added to `Identifiers.sharedIdentifiers` and `BuildApiTest.CountApisForSplitFramework`, otherwise the guarded members are silently dropped from `api_list.include.md` and from the API counts. - `//Link:` comments on public methods must use `?view=net-11.0` for learn.microsoft.com URLs (enforced by `LinkReader`). For overloaded methods, include the `#fragment` anchor pointing to the specific overload (e.g., `#system-type-method(system-string-system-int32)`). - `//Note: ` comments (also leading trivia, parsed by `LinkReader.GetNotes`) attach a caveat to a polyfilled API. Each line emits a sub-bullet `* Note: ` under the signature in `api_list.include.md` (rendered by `BuildApiTest.WriteNotes`). Use sparingly — only when behavior diverges from the BCL in a way callers must know about (e.g., O(n) vs O(1), free-standing struct vs nested type, different exception type). Don't restate the doc summary. - Section-level opt-in gates (e.g., `Ensure`, `ArgumentNullException`) are emitted as a `> Requires true` blockquote under the section header. The mapping lives in `BuildApiTest.sectionGates` — add an entry there when you introduce a new section whose members all require an MSBuild flag. diff --git a/readme.md b/readme.md index 20c95f08..dca883a6 100644 --- a/readme.md +++ b/readme.md @@ -13,34 +13,34 @@ The package targets `netstandard2.0` and is designed to support the following ru * `uap10` -**API count: 1088** +**API count: 1091** ### Per Target Framework | Target | APIs | | -- | -- | -| `net461` | 1005 | -| `net462` | 1005 | -| `net47` | 1004 | -| `net471` | 1003 | -| `net472` | 999 | -| `net48` | 999 | -| `net481` | 999 | -| `netstandard2.0` | 1001 | -| `netstandard2.1` | 854 | -| `netcoreapp2.0` | 924 | -| `netcoreapp2.1` | 865 | -| `netcoreapp2.2` | 865 | -| `netcoreapp3.0` | 826 | -| `netcoreapp3.1` | 825 | -| `net5.0` | 697 | -| `net6.0` | 598 | -| `net7.0` | 445 | -| `net8.0` | 324 | -| `net9.0` | 230 | -| `net10.0` | 176 | +| `net461` | 1022 | +| `net462` | 1022 | +| `net47` | 1021 | +| `net471` | 1020 | +| `net472` | 1016 | +| `net48` | 1016 | +| `net481` | 1016 | +| `netstandard2.0` | 1018 | +| `netstandard2.1` | 871 | +| `netcoreapp2.0` | 941 | +| `netcoreapp2.1` | 882 | +| `netcoreapp2.2` | 882 | +| `netcoreapp3.0` | 843 | +| `netcoreapp3.1` | 842 | +| `net5.0` | 714 | +| `net6.0` | 615 | +| `net7.0` | 462 | +| `net8.0` | 341 | +| `net9.0` | 232 | +| `net10.0` | 178 | | `net11.0` | 58 | -| `uap10.0` | 991 | +| `uap10.0` | 1008 | @@ -96,24 +96,24 @@ This project uses features from the newest stable SDK and C# language. As such c | | Empty Assembly | With Polyfill | Diff | Ensure | ArgumentExceptions | StringInterpolation | Nullability | |----------------|----------------|---------------|-----------|-----------|--------------------|---------------------|-------------| -| netstandard2.0 | 8.0KB | 368.0KB | +360.0KB | +7.5KB | +5.5KB | +7.5KB | +12.0KB | -| netstandard2.1 | 8.5KB | 322.0KB | +313.5KB | +9.0KB | +6.5KB | +9.0KB | +13.5KB | -| net461 | 8.5KB | 365.5KB | +357.0KB | +9.0KB | +6.5KB | +9.0KB | +13.5KB | -| net462 | 7.0KB | 370.5KB | +363.5KB | +7.5KB | +6.5KB | +9.0KB | +12.0KB | -| net47 | 7.0KB | 370.0KB | +363.0KB | +7.5KB | +6.5KB | +9.5KB | +12.0KB | -| net471 | 8.5KB | 368.0KB | +359.5KB | +8.5KB | +6.5KB | +9.0KB | +13.5KB | -| net472 | 8.5KB | 366.5KB | +358.0KB | +9.0KB | +6.5KB | +9.0KB | +13.5KB | -| net48 | 8.5KB | 366.5KB | +358.0KB | +9.0KB | +6.5KB | +9.0KB | +13.5KB | -| net481 | 8.5KB | 366.5KB | +358.0KB | +9.0KB | +6.5KB | +9.0KB | +13.5KB | -| netcoreapp2.0 | 9.0KB | 345.5KB | +336.5KB | +9.0KB | +6.5KB | +9.0KB | +13.5KB | -| netcoreapp2.1 | 9.0KB | 325.5KB | +316.5KB | +9.0KB | +6.5KB | +9.0KB | +14.0KB | -| netcoreapp2.2 | 9.0KB | 325.5KB | +316.5KB | +9.0KB | +6.5KB | +9.0KB | +14.0KB | -| netcoreapp3.0 | 9.5KB | 321.5KB | +312.0KB | +9.0KB | +6.5KB | +9.0KB | +13.5KB | -| netcoreapp3.1 | 9.5KB | 320.0KB | +310.5KB | +8.5KB | +6.5KB | +9.0KB | +13.5KB | -| net5.0 | 9.5KB | 284.0KB | +274.5KB | +9.0KB | +6.5KB | +9.0KB | +13.5KB | -| net6.0 | 10.0KB | 225.5KB | +215.5KB | +10.0KB | +7.0KB | +512bytes | +3.5KB | -| net7.0 | 10.0KB | 191.0KB | +181.0KB | +9.0KB | +5.5KB | +512bytes | +3.0KB | -| net8.0 | 9.5KB | 161.0KB | +151.5KB | +8.5KB | | +512bytes | +3.0KB | +| netstandard2.0 | 8.0KB | 368.0KB | +360.0KB | +9.0KB | +6.5KB | +9.0KB | +13.5KB | +| netstandard2.1 | 8.5KB | 323.5KB | +315.0KB | +9.0KB | +6.5KB | +9.0KB | +13.5KB | +| net461 | 8.5KB | 367.0KB | +358.5KB | +8.5KB | +6.5KB | +9.0KB | +13.0KB | +| net462 | 7.0KB | 371.5KB | +364.5KB | +8.0KB | +7.0KB | +8.0KB | +12.5KB | +| net47 | 7.0KB | 371.5KB | +364.5KB | +7.5KB | +6.5KB | +9.0KB | +12.0KB | +| net471 | 8.5KB | 369.5KB | +361.0KB | +8.5KB | +6.5KB | +9.0KB | +13.0KB | +| net472 | 8.5KB | 368.0KB | +359.5KB | +9.0KB | +6.5KB | +9.0KB | +13.5KB | +| net48 | 8.5KB | 368.0KB | +359.5KB | +9.0KB | +6.5KB | +9.0KB | +13.5KB | +| net481 | 8.5KB | 368.0KB | +359.5KB | +9.0KB | +6.5KB | +9.0KB | +13.5KB | +| netcoreapp2.0 | 9.0KB | 347.0KB | +338.0KB | +9.0KB | +6.5KB | +9.0KB | +13.5KB | +| netcoreapp2.1 | 9.0KB | 327.0KB | +318.0KB | +9.0KB | +6.5KB | +9.0KB | +13.5KB | +| netcoreapp2.2 | 9.0KB | 327.0KB | +318.0KB | +9.0KB | +6.5KB | +9.0KB | +13.5KB | +| netcoreapp3.0 | 9.5KB | 323.0KB | +313.5KB | +9.0KB | +6.5KB | +9.0KB | +13.5KB | +| netcoreapp3.1 | 9.5KB | 321.0KB | +311.5KB | +9.0KB | +6.5KB | +9.5KB | +14.0KB | +| net5.0 | 9.5KB | 285.5KB | +276.0KB | +9.0KB | +6.5KB | +9.0KB | +13.5KB | +| net6.0 | 10.0KB | 227.0KB | +217.0KB | +9.5KB | +6.5KB | +512bytes | +3.5KB | +| net7.0 | 10.0KB | 192.0KB | +182.0KB | +9.5KB | +6.0KB | +1.0KB | +3.5KB | +| net8.0 | 9.5KB | 162.5KB | +153.0KB | +8.5KB | | +512bytes | +3.0KB | | net9.0 | 9.5KB | 114.0KB | +104.5KB | +8.5KB | | +512bytes | +3.5KB | | net10.0 | 10.0KB | 92.0KB | +82.0KB | +8.5KB | | +512bytes | +3.5KB | | net11.0 | 10.0KB | 21.0KB | +11.0KB | +9.0KB | | +512bytes | +3.5KB | @@ -123,24 +123,24 @@ This project uses features from the newest stable SDK and C# language. As such c | | Empty Assembly | With Polyfill | Diff | Ensure | ArgumentExceptions | StringInterpolation | Nullability | |----------------|----------------|---------------|-----------|-----------|--------------------|---------------------|-------------| -| netstandard2.0 | 8.0KB | 539.5KB | +531.5KB | +15.2KB | +7.2KB | +12.4KB | +17.4KB | -| netstandard2.1 | 8.5KB | 466.9KB | +458.4KB | +16.7KB | +8.2KB | +13.9KB | +18.9KB | -| net461 | 8.5KB | 538.1KB | +529.6KB | +16.7KB | +8.2KB | +13.9KB | +18.9KB | -| net462 | 7.0KB | 543.1KB | +536.1KB | +15.2KB | +8.2KB | +13.9KB | +17.4KB | -| net47 | 7.0KB | 542.3KB | +535.3KB | +15.2KB | +8.2KB | +14.4KB | +17.4KB | -| net471 | 8.5KB | 540.0KB | +531.5KB | +16.2KB | +8.2KB | +13.9KB | +18.9KB | -| net472 | 8.5KB | 537.4KB | +528.9KB | +16.7KB | +8.2KB | +13.9KB | +18.9KB | -| net48 | 8.5KB | 537.4KB | +528.9KB | +16.7KB | +8.2KB | +13.9KB | +18.9KB | -| net481 | 8.5KB | 537.4KB | +528.9KB | +16.7KB | +8.2KB | +13.9KB | +18.9KB | -| netcoreapp2.0 | 9.0KB | 506.5KB | +497.5KB | +16.7KB | +8.2KB | +13.9KB | +18.9KB | -| netcoreapp2.1 | 9.0KB | 474.1KB | +465.1KB | +16.7KB | +8.2KB | +13.9KB | +19.4KB | -| netcoreapp2.2 | 9.0KB | 474.1KB | +465.1KB | +16.7KB | +8.2KB | +13.9KB | +19.4KB | -| netcoreapp3.0 | 9.5KB | 463.4KB | +453.9KB | +16.7KB | +8.2KB | +13.9KB | +18.9KB | -| netcoreapp3.1 | 9.5KB | 461.9KB | +452.4KB | +16.2KB | +8.2KB | +13.9KB | +18.9KB | -| net5.0 | 9.5KB | 407.8KB | +398.3KB | +16.7KB | +8.2KB | +13.9KB | +18.9KB | -| net6.0 | 10.0KB | 329.3KB | +319.3KB | +17.7KB | +8.7KB | +1.1KB | +4.2KB | -| net7.0 | 10.0KB | 276.5KB | +266.5KB | +16.6KB | +6.9KB | +1.1KB | +3.7KB | -| net8.0 | 9.5KB | 232.7KB | +223.2KB | +16.0KB | +299bytes | +1.1KB | +3.7KB | +| netstandard2.0 | 8.0KB | 539.7KB | +531.7KB | +16.7KB | +8.2KB | +13.9KB | +18.9KB | +| netstandard2.1 | 8.5KB | 468.6KB | +460.1KB | +16.7KB | +8.2KB | +13.9KB | +18.9KB | +| net461 | 8.5KB | 539.8KB | +531.3KB | +16.2KB | +8.2KB | +13.9KB | +18.4KB | +| net462 | 7.0KB | 544.3KB | +537.3KB | +15.7KB | +8.7KB | +12.9KB | +17.9KB | +| net47 | 7.0KB | 544.0KB | +537.0KB | +15.2KB | +8.2KB | +13.9KB | +17.4KB | +| net471 | 8.5KB | 541.7KB | +533.2KB | +16.2KB | +8.2KB | +13.9KB | +18.4KB | +| net472 | 8.5KB | 539.1KB | +530.6KB | +16.7KB | +8.2KB | +13.9KB | +18.9KB | +| net48 | 8.5KB | 539.1KB | +530.6KB | +16.7KB | +8.2KB | +13.9KB | +18.9KB | +| net481 | 8.5KB | 539.1KB | +530.6KB | +16.7KB | +8.2KB | +13.9KB | +18.9KB | +| netcoreapp2.0 | 9.0KB | 508.2KB | +499.2KB | +16.7KB | +8.2KB | +13.9KB | +18.9KB | +| netcoreapp2.1 | 9.0KB | 475.8KB | +466.8KB | +16.7KB | +8.2KB | +13.9KB | +18.9KB | +| netcoreapp2.2 | 9.0KB | 475.8KB | +466.8KB | +16.7KB | +8.2KB | +13.9KB | +18.9KB | +| netcoreapp3.0 | 9.5KB | 465.1KB | +455.6KB | +16.7KB | +8.2KB | +13.9KB | +18.9KB | +| netcoreapp3.1 | 9.5KB | 463.1KB | +453.6KB | +16.7KB | +8.2KB | +14.4KB | +19.4KB | +| net5.0 | 9.5KB | 409.5KB | +400.0KB | +16.7KB | +8.2KB | +13.9KB | +18.9KB | +| net6.0 | 10.0KB | 331.0KB | +321.0KB | +17.2KB | +8.2KB | +1.1KB | +4.2KB | +| net7.0 | 10.0KB | 277.7KB | +267.7KB | +17.1KB | +7.4KB | +1.6KB | +4.2KB | +| net8.0 | 9.5KB | 234.4KB | +224.9KB | +16.0KB | +299bytes | +1.1KB | +3.7KB | | net9.0 | 9.5KB | 164.6KB | +155.1KB | +16.0KB | | +1.1KB | +4.2KB | | net10.0 | 10.0KB | 133.9KB | +123.9KB | +16.0KB | | +1.1KB | +4.2KB | | net11.0 | 10.0KB | 30.9KB | +20.9KB | +16.5KB | | +1.1KB | +4.2KB | @@ -705,6 +705,16 @@ The class `Polyfill` includes the following extension methods: * `int PopCount()` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.collections.bitarray.popcount?view=net-11.0) +#### BitConverter + + * `ulong DoubleToUInt64Bits(double)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.bitconverter.doubletouint64bits?view=net-11.0) + * `float Int32BitsToSingle(int)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.bitconverter.int32bitstosingle?view=net-11.0) + * `int SingleToInt32Bits(float)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.bitconverter.singletoint32bits?view=net-11.0) + * `uint SingleToUInt32Bits(float)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.bitconverter.singletouint32bits?view=net-11.0) + * `float UInt32BitsToSingle(uint)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.bitconverter.uint32bitstosingle?view=net-11.0) + * `double UInt64BitsToDouble(ulong)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.bitconverter.uint64bitstodouble?view=net-11.0) + + #### Boolean * `bool TryFormat(Span, int)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.boolean.tryformat?view=net-11.0) @@ -738,7 +748,7 @@ The class `Polyfill` includes the following extension methods: #### Capture - * `ValueSpan` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.text.regularexpressions.capture.valuespan?view=net-11.0) + * `ReadOnlySpan ValueSpan` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.text.regularexpressions.capture.valuespan?view=net-11.0) #### Char @@ -756,8 +766,10 @@ The class `Polyfill` includes the following extension methods: * `bool IsBetween(char, char, char)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.char.isbetween?view=net-11.0) * `char ToLowerOrdinal(char)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.char.tolowerordinal?view=net-11.0) * Note: Derived from invariant casing, so the mapping follows the Unicode version of the running framework rather than the one net11 is built against. + * Note: Derived from invariant casing, so the mapping follows the Unicode version of the running framework rather than the one net11 is built against. * `char ToUpperOrdinal(char)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.char.toupperordinal?view=net-11.0) * Note: Derived from invariant casing, so the mapping follows the Unicode version of the running framework rather than the one net11 is built against. + * Note: Derived from invariant casing, so the mapping follows the Unicode version of the running framework rather than the one net11 is built against. #### ConcurrentBag @@ -779,6 +791,7 @@ The class `Polyfill` includes the following extension methods: * `bool Remove(TKey, TValue) where TKey : class where TValue : class` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.runtime.compilerservices.conditionalweaktable-2.remove?view=net-11.0#system-runtime-compilerservices-conditionalweaktable-2-remove(-0-1@)) * Note: Lookup and removal are not performed under the table lock, so the operation is not atomic with regard to concurrent mutations. + * Note: Lookup and removal are not performed under the table lock, so the operation is not atomic with regard to concurrent mutations. #### Console @@ -831,8 +844,8 @@ The class `Polyfill` includes the following extension methods: * `bool TryParse(string?, IFormatProvider?, DateTime)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.datetime.tryparse?view=net-11.0#system-datetime-tryparse(system-string-system-iformatprovider-system-datetime@)) * `bool TryParseExact(ReadOnlySpan, ReadOnlySpan, IFormatProvider?, DateTimeStyles, DateTime)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.datetime.tryparseexact?view=net-11.0#system-datetime-tryparseexact(system-readonlyspan((system-char))-system-readonlyspan((system-char))-system-iformatprovider-system-globalization-datetimestyles-system-datetime@)) * `bool TryParseExact(ReadOnlySpan, string, IFormatProvider?, DateTimeStyles, DateTime)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.datetime.tryparseexact?view=net-11.0#system-datetime-tryparseexact(system-readonlyspan((system-char))-system-readonlyspan((system-char))-system-iformatprovider-system-globalization-datetimestyles-system-datetime@)) - * `Microsecond` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.datetime.microsecond?view=net-11.0) - * `Nanosecond` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.datetime.nanosecond?view=net-11.0) + * `int Microsecond` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.datetime.microsecond?view=net-11.0) + * `int Nanosecond` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.datetime.nanosecond?view=net-11.0) #### DateTimeOffset @@ -847,8 +860,8 @@ The class `Polyfill` includes the following extension methods: * `bool TryParse(string?, IFormatProvider?, DateTimeOffset)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.datetimeoffset.tryparse?view=net-11.0#system-datetimeoffset-tryparse(system-string-system-iformatprovider-system-datetimeoffset@)) * `bool TryParseExact(ReadOnlySpan, ReadOnlySpan, IFormatProvider?, DateTimeStyles, DateTimeOffset)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.datetimeoffset.tryparseexact?view=net-11.0#system-datetimeoffset-tryparseexact(system-readonlyspan((system-char))-system-readonlyspan((system-char))-system-iformatprovider-system-globalization-datetimestyles-system-datetimeoffset@)) * `bool TryParseExact(ReadOnlySpan, string, IFormatProvider?, DateTimeStyles, DateTimeOffset)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.datetimeoffset.tryparseexact?view=net-11.0#system-datetimeoffset-tryparseexact(system-readonlyspan((system-char))-system-readonlyspan((system-char))-system-iformatprovider-system-globalization-datetimestyles-system-datetimeoffset@)) - * `Microsecond` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.datetimeoffset.microsecond?view=net-11.0) - * `Nanosecond` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.datetimeoffset.nanosecond?view=net-11.0) + * `int Microsecond` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.datetimeoffset.microsecond?view=net-11.0) + * `int Nanosecond` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.datetimeoffset.nanosecond?view=net-11.0) #### Decimal @@ -872,22 +885,28 @@ The class `Polyfill` includes the following extension methods: #### Delegate * `InvocationListEnumerator EnumerateInvocationList(TDelegate?) where TDelegate : Delegate` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.delegate.enumerateinvocationlist?view=net-11.0) - * `HasSingleTarget` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.delegate.hassingletarget?view=net-11.0) + * `bool HasSingleTarget` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.delegate.hassingletarget?view=net-11.0) #### Dictionary * `void EnsureCapacity(int)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.dictionary-2.ensurecapacity?view=net-11.0) * Note: No-op on older targets; the BCL grows the backing storage. + * Note: No-op on older targets; the BCL grows the backing storage. * `DictionaryAlternateLookup GetAlternateLookup() where TKey : notnull` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.dictionary-2.getalternatelookup?view=net-11.0) * Note: Lookups are O(n) on older targets; the BCL is O(1). * Note: Returns the free-standing `DictionaryAlternateLookup` rather than the BCL's nested `Dictionary.AlternateLookup`. Use `var` for cross-target code. + * Note: Lookups are O(n) on older targets; the BCL is O(1). + * Note: Returns the free-standing `DictionaryAlternateLookup` rather than the BCL's nested `Dictionary.AlternateLookup`. Use `var` for cross-target code. * `void TrimExcess(int)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.dictionary-2.trimexcess?view=net-11.0#system-collections-generic-dictionary-2-trimexcess(system-int32)) * Note: No-op on older targets; the BCL shrinks the backing storage. + * Note: No-op on older targets; the BCL shrinks the backing storage. * `void TrimExcess()` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.dictionary-2.trimexcess?view=net-11.0#system-collections-generic-dictionary-2-trimexcess) * Note: No-op on older targets; the BCL shrinks the backing storage. + * Note: No-op on older targets; the BCL shrinks the backing storage. * `bool TryGetAlternateLookup(DictionaryAlternateLookup) where TKey : notnull` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.dictionary-2.trygetalternatelookup?view=net-11.0) * Note: Lookups are O(n) on older targets; the BCL is O(1). + * Note: Lookups are O(n) on older targets; the BCL is O(1). #### DictionaryEntry @@ -918,7 +937,6 @@ The class `Polyfill` includes the following extension methods: #### Double - * `ulong DoubleToUInt64Bits(double)` * `bool TryFormat(Span, int, ReadOnlySpan, IFormatProvider?)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.double.tryformat?view=net-11.0#system-double-tryformat(system-span((system-byte))-system-int32@-system-readonlyspan((system-char))-system-iformatprovider)) * `bool TryFormat(Span, int, ReadOnlySpan, IFormatProvider?)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.double.tryformat?view=net-11.0#system-double-tryformat(system-span((system-char))-system-int32@-system-readonlyspan((system-char))-system-iformatprovider)) * `bool TryParse(ReadOnlySpan, double)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.double.tryparse?view=net-11.0#system-double-tryparse(system-readonlyspan((system-byte))-system-double@)) @@ -944,8 +962,9 @@ The class `Polyfill` includes the following extension methods: * `string GetString(ReadOnlySpan)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.text.encoding.getstring?view=net-11.0#system-text-encoding-getstring(system-readonlyspan((system-byte)))) * `bool TryGetBytes(ReadOnlySpan, Span, int)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.text.encoding.trygetbytes?view=net-11.0) * `bool TryGetChars(ReadOnlySpan, Span, int)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.text.encoding.trygetchars?view=net-11.0) - * `Latin1` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.text.encoding.latin1?view=net-11.0) - * `Preamble` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.text.encoding.preamble?view=net-11.0) + * `Encoding Latin1` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.text.encoding.latin1?view=net-11.0) + * `ReadOnlySpan Preamble` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.text.encoding.preamble?view=net-11.0) + * Note: Allocates a new array on each access, unlike the BCL property which returns a cached span. * Note: Allocates a new array on each access, unlike the BCL property which returns a cached span. @@ -973,8 +992,8 @@ The class `Polyfill` includes the following extension methods: #### Environment - * `ProcessId` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.environment.processid?view=net-11.0#system-environment-processid) - * `ProcessPath` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.environment.processpath?view=net-11.0#system-environment-processpath) + * `int ProcessId` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.environment.processid?view=net-11.0#system-environment-processid) + * `string? ProcessPath` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.environment.processpath?view=net-11.0#system-environment-processpath) #### EqualityComparer @@ -1064,20 +1083,25 @@ The class `Polyfill` includes the following extension methods: * `bool TryParse(ReadOnlySpan, IFormatProvider?, Guid)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.guid.tryparse?view=net-11.0#system-guid-tryparse(system-readonlyspan((system-char))-system-iformatprovider-system-guid@)) * `bool TryParse(string?, IFormatProvider?, Guid)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.guid.tryparse?view=net-11.0#system-guid-tryparse(system-string-system-iformatprovider-system-guid@)) * `bool TryParseExact(ReadOnlySpan, ReadOnlySpan, Guid)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.guid.tryparseexact?view=net-11.0#system-guid-tryparseexact(system-readonlyspan((system-char))-system-readonlyspan((system-char))-system-guid@)) - * `AllBitsSet` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.guid.allbitsset?view=net-11.0) + * `Guid AllBitsSet` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.guid.allbitsset?view=net-11.0) #### HashSet * `void EnsureCapacity(int)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.hashset-1.ensurecapacity?view=net-11.0#system-collections-generic-hashset-1-ensurecapacity(system-int32)) * Note: No-op on older targets; the BCL grows the backing storage. + * Note: No-op on older targets; the BCL grows the backing storage. * `HashSetAlternateLookup GetAlternateLookup()` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.hashset-1.getalternatelookup?view=net-11.0) * Note: Lookups are O(n) on older targets; the BCL is O(1). * Note: Returns the free-standing `HashSetAlternateLookup` rather than the BCL's nested `HashSet.AlternateLookup`. Use `var` for cross-target code. + * Note: Lookups are O(n) on older targets; the BCL is O(1). + * Note: Returns the free-standing `HashSetAlternateLookup` rather than the BCL's nested `HashSet.AlternateLookup`. Use `var` for cross-target code. * `void TrimExcess(int)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.hashset-1.trimexcess?view=net-11.0#system-collections-generic-hashset-1-trimexcess(system-int32)) * Note: No-op on older targets; the BCL shrinks the backing storage. + * Note: No-op on older targets; the BCL shrinks the backing storage. * `bool TryGetAlternateLookup(HashSetAlternateLookup)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.hashset-1.trygetalternatelookup?view=net-11.0) * Note: Lookups are O(n) on older targets; the BCL is O(1). + * Note: Lookups are O(n) on older targets; the BCL is O(1). * `bool TryGetValue(T, T)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.hashset-1.trygetvalue?view=net-11.0) @@ -1219,7 +1243,6 @@ The class `Polyfill` includes the following extension methods: #### Int32 - * `float Int32BitsToSingle(int)` * `bool TryFormat(Span, int, ReadOnlySpan, IFormatProvider?)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.int32.tryformat?view=net-11.0#system-int32-tryformat(system-span((system-byte))-system-int32@-system-readonlyspan((system-char))-system-iformatprovider)) * `bool TryFormat(Span, int, ReadOnlySpan, IFormatProvider?)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.int32.tryformat?view=net-11.0#system-int32-tryformat(system-span((system-char))-system-int32@-system-readonlyspan((system-char))-system-iformatprovider)) * `int Log10(int)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.int32.log10?view=net-11.0) @@ -1248,6 +1271,8 @@ The class `Polyfill` includes the following extension methods: #### Interlocked + * `T And(T, T) where T : struct` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.threading.interlocked.and?view=net-11.0) + * `T Or(T, T) where T : struct` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.threading.interlocked.or?view=net-11.0) #### IntPtr @@ -1294,9 +1319,12 @@ The class `Polyfill` includes the following extension methods: * `void EnsureCapacity(int)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.list-1.ensurecapacity?view=net-11.0#system-collections-generic-list-1-ensurecapacity(system-int32)) * Note: No-op on older targets; the BCL grows the backing storage. * Note: Returns void on older targets; the BCL returns int (the new capacity). + * Note: No-op on older targets; the BCL grows the backing storage. + * Note: Returns void on older targets; the BCL returns int (the new capacity). * `void InsertRange(int, ReadOnlySpan)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.collectionextensions.insertrange?view=net-11.0) * `void TrimExcess()` * Note: No-op on older targets; the BCL shrinks the backing storage. + * Note: No-op on older targets; the BCL shrinks the backing storage. #### Math @@ -1428,6 +1456,7 @@ The class `Polyfill` includes the following extension methods: * `Task<(byte[] StandardOutput, byte[] StandardError)> ReadAllBytesAsync(CancellationToken)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.process.readallbytesasync?view=net-11.0) * `IEnumerable ReadAllLines(TimeSpan?)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.process.readalllines?view=net-11.0) * Note: The timeout is measured from the point enumeration starts, since the returned sequence is lazy. + * Note: The timeout is measured from the point enumeration starts, since the returned sequence is lazy. * `IAsyncEnumerable ReadAllLinesAsync(CancellationToken)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.process.readalllinesasync?view=net-11.0) * `(string StandardOutput, string StandardError) ReadAllText(TimeSpan?)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.process.readalltext?view=net-11.0) * `Task<(string StandardOutput, string StandardError)> ReadAllTextAsync(CancellationToken)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.process.readalltextasync?view=net-11.0) @@ -1456,6 +1485,11 @@ The class `Polyfill` includes the following extension methods: * `bool TryGetProcessById(int, Process?)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.process.trygetprocessbyid?view=net-11.0) +#### ProcessStartInfo + + * `Collection ArgumentList` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.processstartinfo.argumentlist?view=net-11.0) + + #### PropertyInfo * `NullabilityState GetNullability()` @@ -1467,8 +1501,10 @@ The class `Polyfill` includes the following extension methods: * `void EnsureCapacity(int)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.queue-1.ensurecapacity?view=net-11.0#system-collections-generic-queue-1-ensurecapacity(system-int32)) * Note: No-op on older targets; the BCL grows the backing storage. + * Note: No-op on older targets; the BCL grows the backing storage. * `void TrimExcess(int)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.queue-1.trimexcess?view=net-11.0#system-collections-generic-queue-1-trimexcess(system-int32)) * Note: No-op on older targets; the BCL shrinks the backing storage. + * Note: No-op on older targets; the BCL shrinks the backing storage. * `bool TryDequeue(T)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.queue-1.trydequeue?view=net-11.0) * `bool TryPeek(T)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.queue-1.trypeek?view=net-11.0) @@ -1488,7 +1524,7 @@ The class `Polyfill` includes the following extension methods: * `float NextSingle()` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.random.nextsingle?view=net-11.0) * `void Shuffle(Span)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.random.nextbytes?view=net-11.0#system-random-nextbytes(system-span((system-byte)))) * `void Shuffle(T[])` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.random.nextbytes?view=net-11.0#system-random-nextbytes(system-span((system-byte)))) - * `Shared` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.random.shared?view=net-11.0) + * `Random Shared` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.random.shared?view=net-11.0) #### RandomNumberGenerator @@ -1524,8 +1560,10 @@ The class `Polyfill` includes the following extension methods: * `bool StartsWith(string, StringComparison)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.memoryextensions.startswith?view=net-11.0#system-memoryextensions-startswith-1(system-readonlyspan((-0))-system-readonlyspan((-0)))) * `int ToLowerOrdinal(Span)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.memoryextensions.tolowerordinal?view=net-11.0) * Note: Derived from invariant casing, so the mapping follows the Unicode version of the running framework rather than the one net11 is built against. + * Note: Derived from invariant casing, so the mapping follows the Unicode version of the running framework rather than the one net11 is built against. * `int ToUpperOrdinal(Span)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.memoryextensions.toupperordinal?view=net-11.0) * Note: Derived from invariant casing, so the mapping follows the Unicode version of the running framework rather than the one net11 is built against. + * Note: Derived from invariant casing, so the mapping follows the Unicode version of the running framework rather than the one net11 is built against. * `bool TryNormalize(Span, int, NormalizationForm)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.stringnormalizationextensions.trynormalize?view=net-11.0#system-stringnormalizationextensions-trynormalize(system-readonlyspan((system-char))-system-span((system-char))-system-int32@-system-text-normalizationform)) @@ -1600,13 +1638,15 @@ The class `Polyfill` includes the following extension methods: * `bool Equals(Rune, StringComparison)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.text.rune.equals?view=net-11.0#system-text-rune-equals(system-text-rune-system-stringcomparison)) * `Rune ToLowerOrdinal(Rune)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.text.rune.tolowerordinal?view=net-11.0) * Note: Derived from invariant casing, so the mapping follows the Unicode version of the running framework rather than the one net11 is built against. + * Note: Derived from invariant casing, so the mapping follows the Unicode version of the running framework rather than the one net11 is built against. * `Rune ToUpperOrdinal(Rune)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.text.rune.toupperordinal?view=net-11.0) * Note: Derived from invariant casing, so the mapping follows the Unicode version of the running framework rather than the one net11 is built against. + * Note: Derived from invariant casing, so the mapping follows the Unicode version of the running framework rather than the one net11 is built against. #### RuntimeFeature - * `IsMultithreadingSupported` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.runtime.compilerservices.runtimefeature.ismultithreadingsupported?view=net-11.0) + * `bool IsMultithreadingSupported` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.runtime.compilerservices.runtimefeature.ismultithreadingsupported?view=net-11.0) #### SByte @@ -1673,8 +1713,6 @@ The class `Polyfill` includes the following extension methods: #### Single - * `int SingleToInt32Bits(float)` - * `uint SingleToUInt32Bits(float)` * `bool TryFormat(Span, int, ReadOnlySpan, IFormatProvider?)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.single.tryformat?view=net-11.0#system-single-tryformat(system-span((system-byte))-system-int32@-system-readonlyspan((system-char))-system-iformatprovider)) * `bool TryFormat(Span, int, ReadOnlySpan, IFormatProvider?)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.single.tryformat?view=net-11.0#system-single-tryformat(system-span((system-char))-system-int32@-system-readonlyspan((system-char))-system-iformatprovider)) * `bool TryParse(ReadOnlySpan, float)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.single.tryparse?view=net-11.0#system-single-tryparse(system-readonlyspan((system-byte))-system-single@)) @@ -1744,8 +1782,10 @@ The class `Polyfill` includes the following extension methods: * `void EnsureCapacity(int)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.stack-1.ensurecapacity?view=net-11.0) * Note: No-op on older targets; the BCL grows the backing storage. + * Note: No-op on older targets; the BCL grows the backing storage. * `void TrimExcess(int)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.stack-1.trimexcess?view=net-11.0#system-collections-generic-stack-1-trimexcess(system-int32)) * Note: No-op on older targets; the BCL shrinks the backing storage. + * Note: No-op on older targets; the BCL shrinks the backing storage. * `bool TryPeek(T)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.stack-1.trypeek?view=net-11.0) * `bool TryPop(T)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.stack-1.trypop?view=net-11.0) @@ -1797,8 +1837,10 @@ The class `Polyfill` includes the following extension methods: * `bool StartsWith(char)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.string.startswith?view=net-11.0#system-string-startswith(system-char)) * `string ToLowerOrdinal()` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.string.tolowerordinal?view=net-11.0) * Note: Derived from invariant casing, so the mapping follows the Unicode version of the running framework rather than the one net11 is built against. + * Note: Derived from invariant casing, so the mapping follows the Unicode version of the running framework rather than the one net11 is built against. * `string ToUpperOrdinal()` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.string.toupperordinal?view=net-11.0) * Note: Derived from invariant casing, so the mapping follows the Unicode version of the running framework rather than the one net11 is built against. + * Note: Derived from invariant casing, so the mapping follows the Unicode version of the running framework rather than the one net11 is built against. * `bool TryCopyTo(Span)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.string.trycopyto?view=net-11.0) * `string Concat(ReadOnlySpan)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.string.concat?view=net-11.0#system-string-concat(system-readonlyspan((system-object)))) * `string Concat(ReadOnlySpan)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.string.concat?view=net-11.0#system-string-concat(system-readonlyspan((system-string)))) @@ -1836,6 +1878,7 @@ The class `Polyfill` includes the following extension methods: * `void CopyTo(int, Span, int)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.text.stringbuilder.copyto?view=net-11.0#system-text-stringbuilder-copyto(system-int32-system-span((system-char))-system-int32)) * `StringBuilderRuneEnumerator EnumerateRunes()` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.text.stringbuilder.enumeraterunes?view=net-11.0) * Note: Enumerates over a snapshot of the content taken when enumeration starts, so changes made to the StringBuilder while enumerating are not observed. + * Note: Enumerates over a snapshot of the content taken when enumeration starts, so changes made to the StringBuilder while enumerating are not observed. * `bool Equals(ReadOnlySpan)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.text.stringbuilder.equals?view=net-11.0#system-text-stringbuilder-equals(system-readonlyspan((system-char)))) * `ChunkEnumerator GetChunks()` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.text.stringbuilder.getchunks?view=net-11.0) * `Rune GetRuneAt(int)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.text.stringbuilder.getruneat?view=net-11.0) @@ -1928,37 +1971,52 @@ The class `Polyfill` includes the following extension methods: * `TimeSpan FromMilliseconds(long, long)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.timespan.frommilliseconds?view=net-11.0#system-timespan-frommilliseconds(system-int64-system-int64)) * `TimeSpan FromMinutes(int, int, int, int)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.timespan.fromminutes?view=net-11.0#system-timespan-fromminutes(system-int32-system-int32-system-int32-system-int32)) * `TimeSpan FromSeconds(long, long, long)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.timespan.fromseconds?view=net-11.0#system-timespan-fromseconds(system-int64-system-int64-system-int64)) - * `HoursPerDay` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.timespan.hoursperday?view=net-11.0) + * `int HoursPerDay` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.timespan.hoursperday?view=net-11.0) + * Note: A property rather than a const, since extension members cannot declare constants, so it cannot be used in a constant expression. + * Note: A property rather than a const, since extension members cannot declare constants, so it cannot be used in a constant expression. + * `int Microseconds` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.timespan.microseconds?view=net-11.0) + * `long MicrosecondsPerDay` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.timespan.microsecondsperday?view=net-11.0) + * Note: A property rather than a const, since extension members cannot declare constants, so it cannot be used in a constant expression. + * Note: A property rather than a const, since extension members cannot declare constants, so it cannot be used in a constant expression. + * `long MicrosecondsPerHour` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.timespan.microsecondsperhour?view=net-11.0) + * Note: A property rather than a const, since extension members cannot declare constants, so it cannot be used in a constant expression. + * Note: A property rather than a const, since extension members cannot declare constants, so it cannot be used in a constant expression. + * `long MicrosecondsPerMillisecond` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.timespan.microsecondspermillisecond?view=net-11.0) * Note: A property rather than a const, since extension members cannot declare constants, so it cannot be used in a constant expression. - * `Microseconds` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.timespan.microseconds?view=net-11.0) - * `MicrosecondsPerDay` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.timespan.microsecondsperday?view=net-11.0) * Note: A property rather than a const, since extension members cannot declare constants, so it cannot be used in a constant expression. - * `MicrosecondsPerHour` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.timespan.microsecondsperhour?view=net-11.0) + * `long MicrosecondsPerMinute` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.timespan.microsecondsperminute?view=net-11.0) * Note: A property rather than a const, since extension members cannot declare constants, so it cannot be used in a constant expression. - * `MicrosecondsPerMillisecond` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.timespan.microsecondspermillisecond?view=net-11.0) * Note: A property rather than a const, since extension members cannot declare constants, so it cannot be used in a constant expression. - * `MicrosecondsPerMinute` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.timespan.microsecondsperminute?view=net-11.0) + * `long MicrosecondsPerSecond` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.timespan.microsecondspersecond?view=net-11.0) * Note: A property rather than a const, since extension members cannot declare constants, so it cannot be used in a constant expression. - * `MicrosecondsPerSecond` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.timespan.microsecondspersecond?view=net-11.0) * Note: A property rather than a const, since extension members cannot declare constants, so it cannot be used in a constant expression. - * `MillisecondsPerDay` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.timespan.millisecondsperday?view=net-11.0) + * `long MillisecondsPerDay` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.timespan.millisecondsperday?view=net-11.0) * Note: A property rather than a const, since extension members cannot declare constants, so it cannot be used in a constant expression. - * `MillisecondsPerHour` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.timespan.millisecondsperhour?view=net-11.0) * Note: A property rather than a const, since extension members cannot declare constants, so it cannot be used in a constant expression. - * `MillisecondsPerMinute` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.timespan.millisecondsperminute?view=net-11.0) + * `long MillisecondsPerHour` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.timespan.millisecondsperhour?view=net-11.0) * Note: A property rather than a const, since extension members cannot declare constants, so it cannot be used in a constant expression. - * `MillisecondsPerSecond` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.timespan.millisecondspersecond?view=net-11.0) * Note: A property rather than a const, since extension members cannot declare constants, so it cannot be used in a constant expression. - * `MinutesPerDay` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.timespan.minutesperday?view=net-11.0) + * `long MillisecondsPerMinute` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.timespan.millisecondsperminute?view=net-11.0) * Note: A property rather than a const, since extension members cannot declare constants, so it cannot be used in a constant expression. - * `MinutesPerHour` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.timespan.minutesperhour?view=net-11.0) * Note: A property rather than a const, since extension members cannot declare constants, so it cannot be used in a constant expression. - * `Nanoseconds` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.timespan.nanoseconds?view=net-11.0) - * `SecondsPerDay` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.timespan.secondsperday?view=net-11.0) + * `long MillisecondsPerSecond` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.timespan.millisecondspersecond?view=net-11.0) * Note: A property rather than a const, since extension members cannot declare constants, so it cannot be used in a constant expression. - * `SecondsPerHour` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.timespan.secondsperhour?view=net-11.0) * Note: A property rather than a const, since extension members cannot declare constants, so it cannot be used in a constant expression. - * `SecondsPerMinute` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.timespan.secondsperminute?view=net-11.0) + * `long MinutesPerDay` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.timespan.minutesperday?view=net-11.0) + * Note: A property rather than a const, since extension members cannot declare constants, so it cannot be used in a constant expression. + * Note: A property rather than a const, since extension members cannot declare constants, so it cannot be used in a constant expression. + * `long MinutesPerHour` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.timespan.minutesperhour?view=net-11.0) + * Note: A property rather than a const, since extension members cannot declare constants, so it cannot be used in a constant expression. + * Note: A property rather than a const, since extension members cannot declare constants, so it cannot be used in a constant expression. + * `int Nanoseconds` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.timespan.nanoseconds?view=net-11.0) + * `long SecondsPerDay` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.timespan.secondsperday?view=net-11.0) + * Note: A property rather than a const, since extension members cannot declare constants, so it cannot be used in a constant expression. + * Note: A property rather than a const, since extension members cannot declare constants, so it cannot be used in a constant expression. + * `long SecondsPerHour` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.timespan.secondsperhour?view=net-11.0) + * Note: A property rather than a const, since extension members cannot declare constants, so it cannot be used in a constant expression. + * Note: A property rather than a const, since extension members cannot declare constants, so it cannot be used in a constant expression. + * `long SecondsPerMinute` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.timespan.secondsperminute?view=net-11.0) + * Note: A property rather than a const, since extension members cannot declare constants, so it cannot be used in a constant expression. * Note: A property rather than a const, since extension members cannot declare constants, so it cannot be used in a constant expression. @@ -1971,7 +2029,7 @@ The class `Polyfill` includes the following extension methods: * `bool IsAssignableTo(Type?)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.type.isassignableto?view=net-11.0) * `bool IsAssignableTo()` * `Type? GetNullableUnderlyingType()` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.type.getnullableunderlyingtype?view=net-11.0) - * `IsGenericMethodParameter` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.type.isgenericmethodparameter?view=net-11.0) + * `bool IsGenericMethodParameter` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.type.isgenericmethodparameter?view=net-11.0) #### UdpClient @@ -2008,7 +2066,6 @@ The class `Polyfill` includes the following extension methods: * `bool TryFormat(Span, int, ReadOnlySpan, IFormatProvider?)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.uint32.tryformat?view=net-11.0#system-uint32-tryformat(system-span((system-byte))-system-int32@-system-readonlyspan((system-char))-system-iformatprovider)) * `bool TryFormat(Span, int, ReadOnlySpan, IFormatProvider?)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.uint32.tryformat?view=net-11.0#system-uint32-tryformat(system-span((system-char))-system-int32@-system-readonlyspan((system-char))-system-iformatprovider)) - * `float UInt32BitsToSingle(uint)` * `uint Log10(uint)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.uint32.log10?view=net-11.0) * `bool TryParse(ReadOnlySpan, IFormatProvider?, uint)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.uint32.tryparse?view=net-11.0#system-uint32-tryparse(system-readonlyspan((system-byte))-system-iformatprovider-system-uint32@)) * `bool TryParse(ReadOnlySpan, NumberStyles, IFormatProvider?, uint)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.uint32.tryparse?view=net-11.0#system-uint32-tryparse(system-readonlyspan((system-byte))-system-globalization-numberstyles-system-iformatprovider-system-uint32@)) @@ -2023,7 +2080,6 @@ The class `Polyfill` includes the following extension methods: * `bool TryFormat(Span, int, ReadOnlySpan, IFormatProvider?)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.uint64.tryformat?view=net-11.0#system-uint64-tryformat(system-span((system-byte))-system-int32@-system-readonlyspan((system-char))-system-iformatprovider)) * `bool TryFormat(Span, int, ReadOnlySpan, IFormatProvider?)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.uint64.tryformat?view=net-11.0#system-uint64-tryformat(system-span((system-char))-system-int32@-system-readonlyspan((system-char))-system-iformatprovider)) - * `double UInt64BitsToDouble(ulong)` * `ulong Log10(ulong)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.uint64.log10?view=net-11.0) * `bool TryParse(ReadOnlySpan, IFormatProvider?, ulong)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.uint64.tryparse?view=net-11.0#system-uint64-tryparse(system-readonlyspan((system-byte))-system-iformatprovider-system-uint64@)) * `bool TryParse(ReadOnlySpan, NumberStyles, IFormatProvider?, ulong)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.uint64.tryparse?view=net-11.0#system-uint64-tryparse(system-readonlyspan((system-byte))-system-globalization-numberstyles-system-iformatprovider-system-uint64@)) @@ -2050,7 +2106,7 @@ The class `Polyfill` includes the following extension methods: #### Uri - * `UriSchemeData` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.uri.urischemedata?view=net-11.0) + * `string UriSchemeData` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.uri.urischemedata?view=net-11.0) #### Utf8 @@ -2060,7 +2116,7 @@ The class `Polyfill` includes the following extension methods: #### ValueTask - * `CompletedTask` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.valuetask.completedtask?view=net-11.0) + * `ValueTask CompletedTask` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.valuetask.completedtask?view=net-11.0) #### XDocument @@ -2105,7 +2161,7 @@ The class `Polyfill` includes the following extension methods: * `Stream Open(FileAccess)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.io.compression.ziparchiveentry.open?view=net-11.0) * `Task OpenAsync(CancellationToken)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.io.compression.ziparchiveentry.openasync?view=net-11.0#system-io-compression-ziparchiveentry-openasync(system-threading-cancellationtoken)) * `ValueTask OpenAsync(FileAccess, CancellationToken)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.io.compression.ziparchiveentry.openasync?view=net-11.0#system-io-compression-ziparchiveentry-openasync(system-io-fileaccess-system-threading-cancellationtoken)) - * `ExternalAttributes` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.io.compression.ziparchiveentry.externalattributes?view=net-11.0) + * `int ExternalAttributes` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.io.compression.ziparchiveentry.externalattributes?view=net-11.0) #### ZipFile @@ -2188,8 +2244,10 @@ The class `Polyfill` includes the following extension methods: * `Span AsSpan(List?)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.collectionsmarshal.asspan?view=net-11.0) * Note: Reads the list's private backing array via reflection on this target. + * Note: Reads the list's private backing array via reflection on this target. * `void SetCount(List, int)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.collectionsmarshal.setcount?view=net-11.0) * Note: When growing, new elements are default(T); the BCL exposes uninitialized data. + * Note: When growing, new elements are default(T); the BCL exposes uninitialized data. #### BitOperations @@ -2206,8 +2264,10 @@ The class `Polyfill` includes the following extension methods: * `bool FixedTimeEquals(ReadOnlySpan, byte)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.security.cryptography.cryptographicoperations.fixedtimeequals?view=net-11.0#system-security-cryptography-cryptographicoperations-fixedtimeequals(system-readonlyspan((system-byte))-system-byte)) * Note: Best-effort constant-time comparison; a managed loop cannot offer the same guarantees as the BCL intrinsic. + * Note: Best-effort constant-time comparison; a managed loop cannot offer the same guarantees as the BCL intrinsic. * `bool FixedTimeEquals(ReadOnlySpan, ReadOnlySpan)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.security.cryptography.cryptographicoperations.fixedtimeequals?view=net-11.0#system-security-cryptography-cryptographicoperations-fixedtimeequals(system-readonlyspan((system-byte))-system-readonlyspan((system-byte)))) * Note: Best-effort constant-time comparison; a managed loop cannot offer the same guarantees as the BCL intrinsic. + * Note: Best-effort constant-time comparison; a managed loop cannot offer the same guarantees as the BCL intrinsic. * `byte[] HashData(HashAlgorithmName, byte[])` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.security.cryptography.cryptographicoperations.hashdata?view=net-11.0#system-security-cryptography-cryptographicoperations-hashdata(system-security-cryptography-hashalgorithmname-system-byte())) * `int HashData(HashAlgorithmName, ReadOnlySpan, Span)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.security.cryptography.cryptographicoperations.hashdata?view=net-11.0#system-security-cryptography-cryptographicoperations-hashdata(system-security-cryptography-hashalgorithmname-system-readonlyspan((system-byte))-system-span((system-byte)))) * `byte[] HashData(HashAlgorithmName, ReadOnlySpan)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.security.cryptography.cryptographicoperations.hashdata?view=net-11.0#system-security-cryptography-cryptographicoperations-hashdata(system-security-cryptography-hashalgorithmname-system-readonlyspan((system-byte)))) @@ -2234,6 +2294,7 @@ The class `Polyfill` includes the following extension methods: * `ValueTask VerifyHmacAsync(HashAlgorithmName, ReadOnlyMemory, Stream, ReadOnlyMemory, CancellationToken)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.security.cryptography.cryptographicoperations.verifyhmacasync?view=net-11.0#system-security-cryptography-cryptographicoperations-verifyhmacasync(system-security-cryptography-hashalgorithmname-system-readonlymemory((system-byte))-system-io-stream-system-readonlymemory((system-byte))-system-threading-cancellationtoken)) * `void ZeroMemory(Span)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.security.cryptography.cryptographicoperations.zeromemory?view=net-11.0) * Note: Best-effort zeroing; unlike the BCL intrinsic the JIT may elide the clear if the buffer is not observed afterwards. + * Note: Best-effort zeroing; unlike the BCL intrinsic the JIT may elide the clear if the buffer is not observed afterwards. #### Utf16 diff --git a/src/ApiBuilderTests/AssemblySizeTest.cs b/src/ApiBuilderTests/AssemblySizeTest.cs index 7d5a4852..9b0d350e 100644 --- a/src/ApiBuilderTests/AssemblySizeTest.cs +++ b/src/ApiBuilderTests/AssemblySizeTest.cs @@ -26,6 +26,8 @@ public class AssemblySizeTest ]; [Test] + // The measured assemblies are compiled from Split, so it has to be written first + [DependsOn(nameof(SplitterTests.Run))] #if RELEASE [Explicit] #endif diff --git a/src/ApiBuilderTests/BuildApiTest.cs b/src/ApiBuilderTests/BuildApiTest.cs index b5ab6928..d59738a8 100644 --- a/src/ApiBuilderTests/BuildApiTest.cs +++ b/src/ApiBuilderTests/BuildApiTest.cs @@ -3,6 +3,8 @@ public class BuildApiTest static string polyfillDir = Path.Combine(ProjectFiles.SolutionDirectory, "Polyfill"); [Test] + // The per-target-framework counts are read out of Split, so it has to be written first + [DependsOn(nameof(SplitterTests.Run))] #if RELEASE [Explicit] #endif @@ -76,7 +78,8 @@ static int CountApisForSplitFramework(string framework) "FeatureValueTask", "FeatureValueTuple", "FeatureCompression", - "FeatureAsyncInterfaces" + "FeatureAsyncInterfaces", + "FeatureUnsafe" }; var options = CSharpParseOptions.Default.WithPreprocessorSymbols(featureSymbols); @@ -145,9 +148,11 @@ static int WriteExtensions(StreamWriter writer, int count) .ToList(); var instanceMethods = ReadMethodsForFiles(instanceFiles); + var instanceProperties = ReadExtensionPropertiesForFiles(instanceFiles); var instanceTypeNames = instanceMethods - .Select(FirstParameterType); + .Select(SectionName) + .Concat(instanceProperties.Select(SectionName)); var staticTypeNames = staticFiles .Select(Path.GetFileNameWithoutExtension) @@ -163,7 +168,7 @@ static int WriteExtensions(StreamWriter writer, int count) foreach (var name in typeNames.Order()) { var instanceMethodsForType = instanceMethods - .Where(_ => FirstParameterType(_) == name) + .Where(_ => SectionName(_) == name) .ToList(); writer.WriteLine($"#### {name}"); writer.WriteLine(); @@ -177,6 +182,12 @@ static int WriteExtensions(StreamWriter writer, int count) } } + foreach (var property in instanceProperties.Where(_ => SectionName(_) == name)) + { + count++; + WriteSignature(property, writer); + } + var staticExtension = staticFiles .SingleOrDefault(_ => Path.GetFileNameWithoutExtension(_)[..^8].ToString() == name); if (staticExtension != null) @@ -220,12 +231,37 @@ static int WriteExtensions(StreamWriter writer, int count) ["string"] = "String" }; - static string FirstParameterType(Method method) + // The api_list section a member belongs to. Members declared inside an + // `extension(Type)` block belong to that block's receiver type. Classic + // `this`-parameter extension methods belong to the type of that parameter. + static string SectionName(Method method) => + ExtensionReceiver(method) ?? NormalizeType(method.ParameterList.Parameters[0].Type!.ToString()); + + static string SectionName(Property property) => + ExtensionReceiver(property)!; + + static string? ExtensionReceiver(Member member) { - var type = method.ParameterList.Parameters[0].Type!.ToString(); - return langwordToType.GetValueOrDefault(type, type); + var receiver = member + .Ancestors() + .OfType() + .FirstOrDefault(_ => _.GetType().Name == "ExtensionBlockDeclarationSyntax") + ?.ParameterList + ?.Parameters + .FirstOrDefault() + ?.Type; + + if (receiver == null) + { + return null; + } + + return NormalizeType(receiver.ToString()); } + static string NormalizeType(string type) => + langwordToType.GetValueOrDefault(type, type); + static List ReadMethodsForFiles(string pattern) { var files = Directory.EnumerateFiles(polyfillDir, $"{pattern}.cs", SearchOption.AllDirectories); @@ -251,6 +287,17 @@ static List ReadMethodsForFiles(IEnumerable files) .ToList(); } + // Properties on the `Polyfill` partial are only an API surface when they sit inside an + // `extension(Type)` block, so anything else (a helper on Polyfill itself) is skipped. + static List ReadExtensionPropertiesForFiles(IEnumerable files) => + files + .SelectMany(Identifiers.ReadTypesForFile) + .SelectMany(_ => _.PublicProperties()) + .Where(_ => ExtensionReceiver(_) != null) + .DistinctBy(_ => (SectionName(_), _.Identifier.Text)) + .OrderBy(_ => _.Identifier.Text) + .ToList(); + static List ReadPropertiesForFiles(string pattern) { var files = Directory.EnumerateFiles(polyfillDir, $"{pattern}.cs", SearchOption.AllDirectories); @@ -351,11 +398,11 @@ static void WriteSignature(Method method, StreamWriter writer) WriteNotes(method, writer); } - static void WriteSignature(Property method, StreamWriter writer) + static void WriteSignature(Property property, StreamWriter writer) { - var signature = new StringBuilder(method.Identifier.Text); + var signature = $"{property.Type} {property.Identifier.Text}"; - if (method.TryGetReference(out var reference)) + if (property.TryGetReference(out var reference)) { writer.WriteLine($" * `{signature}` [reference]({reference})"); } @@ -364,7 +411,7 @@ static void WriteSignature(Property method, StreamWriter writer) writer.WriteLine($" * `{signature}`"); } - WriteNotes(method, writer); + WriteNotes(property, writer); } static void WriteNotes(Member member, StreamWriter writer) diff --git a/src/ApiBuilderTests/Identifiers.cs b/src/ApiBuilderTests/Identifiers.cs index 75e80a73..cdee076b 100644 --- a/src/ApiBuilderTests/Identifiers.cs +++ b/src/ApiBuilderTests/Identifiers.cs @@ -36,7 +36,8 @@ public static IEnumerable ReadTypesForFile(string file) "FeatureValueTask", "FeatureValueTuple", "FeatureCompression", - "FeatureAsyncInterfaces" + "FeatureAsyncInterfaces", + "FeatureUnsafe" ]; static Identifiers() => diff --git a/src/ApiBuilderTests/LinkReader.cs b/src/ApiBuilderTests/LinkReader.cs index 682a6719..d98a6b85 100644 --- a/src/ApiBuilderTests/LinkReader.cs +++ b/src/ApiBuilderTests/LinkReader.cs @@ -1,9 +1,16 @@ public static class LinkReader { + // A //Link: or //Note: can sit above the declaration, or between its attributes and + // its modifiers. GetLeadingTrivia only covers the first of those, since an attribute + // list is part of the declaration, so the modifiers are scanned as well. + static IEnumerable LeadingComments(this Member member) => + member + .GetLeadingTrivia() + .Concat(member.Modifiers.SelectMany(_ => _.LeadingTrivia)); + public static bool TryGetReference(this Member member, [NotNullWhen(true)] out string? reference) { - var syntaxTrivia = member.GetLeadingTrivia(); - foreach (var trivia in syntaxTrivia) + foreach (var trivia in member.LeadingComments()) { if (!trivia.IsKind(SyntaxKind.SingleLineCommentTrivia)) { @@ -31,7 +38,7 @@ public static bool TryGetReference(this Member member, [NotNullWhen(true)] out s public static IReadOnlyList GetNotes(this Member member) { List? notes = null; - foreach (var trivia in member.GetLeadingTrivia()) + foreach (var trivia in member.LeadingComments()) { if (!trivia.IsKind(SyntaxKind.SingleLineCommentTrivia)) { diff --git a/src/Polyfill/EncodingPolyfill.cs b/src/Polyfill/EncodingPolyfill.cs index 3eafa2fc..53e47cd4 100644 --- a/src/Polyfill/EncodingPolyfill.cs +++ b/src/Polyfill/EncodingPolyfill.cs @@ -2,6 +2,7 @@ namespace Polyfills; +using System; using System.Text; static partial class Polyfill @@ -25,7 +26,7 @@ static partial class Polyfill /// //Link: https://learn.microsoft.com/en-us/dotnet/api/system.text.encoding.preamble?view=net-11.0 //Note: Allocates a new array on each access, unlike the BCL property which returns a cached span. - public System.ReadOnlySpan Preamble => target.GetPreamble(); + public ReadOnlySpan Preamble => target.GetPreamble(); } #endif } diff --git a/src/Polyfill/Polyfill_BitConverter.cs b/src/Polyfill/Polyfill_BitConverter.cs index ce766070..68a3d951 100644 --- a/src/Polyfill/Polyfill_BitConverter.cs +++ b/src/Polyfill/Polyfill_BitConverter.cs @@ -31,7 +31,7 @@ struct BitConverter_Int32_Float /// Reinterprets the specified 32-bit integer as a single-precision floating-point value. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] - //Link: https://learn.microsoft.com/en-us/dotnet/api/system.bitconverter.int32bitstosingle + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.bitconverter.int32bitstosingle?view=net-11.0 #if AllowUnsafeBlocks public static unsafe float Int32BitsToSingle(int value) { @@ -54,7 +54,7 @@ public static float Int32BitsToSingle(int value) /// Converts the specified 32-bit unsigned integer to a single-precision floating point number. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] - //Link: https://learn.microsoft.com/en-us/dotnet/api/system.bitconverter.uint32bitstosingle + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.bitconverter.uint32bitstosingle?view=net-11.0 public static float UInt32BitsToSingle(uint value) { return BitConverter.Int32BitsToSingle((int)value); @@ -68,7 +68,7 @@ public static float UInt32BitsToSingle(uint value) /// Converts the specified 64-bit unsigned integer to a double-precision floating point number. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] - //Link: https://learn.microsoft.com/en-us/dotnet/api/system.bitconverter.uint64bitstodouble + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.bitconverter.uint64bitstodouble?view=net-11.0 public static double UInt64BitsToDouble(ulong value) { return BitConverter.Int64BitsToDouble((long)value); @@ -82,7 +82,7 @@ public static double UInt64BitsToDouble(ulong value) /// Converts a single-precision floating-point value into an integer. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] - //Link: https://learn.microsoft.com/en-us/dotnet/api/system.bitconverter.singletoint32bits + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.bitconverter.singletoint32bits?view=net-11.0 #if AllowUnsafeBlocks public static unsafe int SingleToInt32Bits(float value) { @@ -105,7 +105,7 @@ public static int SingleToInt32Bits(float value) /// Converts the specified single-precision floating point number to a 32-bit unsigned integer. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] - //Link: https://learn.microsoft.com/en-us/dotnet/api/system.bitconverter.singletouint32bits + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.bitconverter.singletouint32bits?view=net-11.0 public static uint SingleToUInt32Bits(float value) { return (uint)BitConverter.SingleToInt32Bits(value); @@ -119,7 +119,7 @@ public static uint SingleToUInt32Bits(float value) /// Converts the specified double-precision floating point number to a 64-bit unsigned integer. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] - //Link: https://learn.microsoft.com/en-us/dotnet/api/system.bitconverter.doubletouint64bits + //Link: https://learn.microsoft.com/en-us/dotnet/api/system.bitconverter.doubletouint64bits?view=net-11.0 public static ulong DoubleToUInt64Bits(double value) { return (ulong)BitConverter.DoubleToInt64Bits(value); diff --git a/src/Split/net461/EncodingPolyfill.cs b/src/Split/net461/EncodingPolyfill.cs index b2044b65..8e48dfa5 100644 --- a/src/Split/net461/EncodingPolyfill.cs +++ b/src/Split/net461/EncodingPolyfill.cs @@ -1,6 +1,7 @@ // #pragma warning disable namespace Polyfills; +using System; using System.Text; static partial class Polyfill { @@ -18,7 +19,7 @@ static partial class Polyfill /// /// When overridden in a derived class, returns a span containing the sequence of bytes that specifies the encoding used. /// - public System.ReadOnlySpan Preamble => target.GetPreamble(); + public ReadOnlySpan Preamble => target.GetPreamble(); } #endif } diff --git a/src/Split/net462/EncodingPolyfill.cs b/src/Split/net462/EncodingPolyfill.cs index b2044b65..8e48dfa5 100644 --- a/src/Split/net462/EncodingPolyfill.cs +++ b/src/Split/net462/EncodingPolyfill.cs @@ -1,6 +1,7 @@ // #pragma warning disable namespace Polyfills; +using System; using System.Text; static partial class Polyfill { @@ -18,7 +19,7 @@ static partial class Polyfill /// /// When overridden in a derived class, returns a span containing the sequence of bytes that specifies the encoding used. /// - public System.ReadOnlySpan Preamble => target.GetPreamble(); + public ReadOnlySpan Preamble => target.GetPreamble(); } #endif } diff --git a/src/Split/net47/EncodingPolyfill.cs b/src/Split/net47/EncodingPolyfill.cs index b2044b65..8e48dfa5 100644 --- a/src/Split/net47/EncodingPolyfill.cs +++ b/src/Split/net47/EncodingPolyfill.cs @@ -1,6 +1,7 @@ // #pragma warning disable namespace Polyfills; +using System; using System.Text; static partial class Polyfill { @@ -18,7 +19,7 @@ static partial class Polyfill /// /// When overridden in a derived class, returns a span containing the sequence of bytes that specifies the encoding used. /// - public System.ReadOnlySpan Preamble => target.GetPreamble(); + public ReadOnlySpan Preamble => target.GetPreamble(); } #endif } diff --git a/src/Split/net471/EncodingPolyfill.cs b/src/Split/net471/EncodingPolyfill.cs index b2044b65..8e48dfa5 100644 --- a/src/Split/net471/EncodingPolyfill.cs +++ b/src/Split/net471/EncodingPolyfill.cs @@ -1,6 +1,7 @@ // #pragma warning disable namespace Polyfills; +using System; using System.Text; static partial class Polyfill { @@ -18,7 +19,7 @@ static partial class Polyfill /// /// When overridden in a derived class, returns a span containing the sequence of bytes that specifies the encoding used. /// - public System.ReadOnlySpan Preamble => target.GetPreamble(); + public ReadOnlySpan Preamble => target.GetPreamble(); } #endif } diff --git a/src/Split/net472/EncodingPolyfill.cs b/src/Split/net472/EncodingPolyfill.cs index b2044b65..8e48dfa5 100644 --- a/src/Split/net472/EncodingPolyfill.cs +++ b/src/Split/net472/EncodingPolyfill.cs @@ -1,6 +1,7 @@ // #pragma warning disable namespace Polyfills; +using System; using System.Text; static partial class Polyfill { @@ -18,7 +19,7 @@ static partial class Polyfill /// /// When overridden in a derived class, returns a span containing the sequence of bytes that specifies the encoding used. /// - public System.ReadOnlySpan Preamble => target.GetPreamble(); + public ReadOnlySpan Preamble => target.GetPreamble(); } #endif } diff --git a/src/Split/net48/EncodingPolyfill.cs b/src/Split/net48/EncodingPolyfill.cs index b2044b65..8e48dfa5 100644 --- a/src/Split/net48/EncodingPolyfill.cs +++ b/src/Split/net48/EncodingPolyfill.cs @@ -1,6 +1,7 @@ // #pragma warning disable namespace Polyfills; +using System; using System.Text; static partial class Polyfill { @@ -18,7 +19,7 @@ static partial class Polyfill /// /// When overridden in a derived class, returns a span containing the sequence of bytes that specifies the encoding used. /// - public System.ReadOnlySpan Preamble => target.GetPreamble(); + public ReadOnlySpan Preamble => target.GetPreamble(); } #endif } diff --git a/src/Split/net481/EncodingPolyfill.cs b/src/Split/net481/EncodingPolyfill.cs index b2044b65..8e48dfa5 100644 --- a/src/Split/net481/EncodingPolyfill.cs +++ b/src/Split/net481/EncodingPolyfill.cs @@ -1,6 +1,7 @@ // #pragma warning disable namespace Polyfills; +using System; using System.Text; static partial class Polyfill { @@ -18,7 +19,7 @@ static partial class Polyfill /// /// When overridden in a derived class, returns a span containing the sequence of bytes that specifies the encoding used. /// - public System.ReadOnlySpan Preamble => target.GetPreamble(); + public ReadOnlySpan Preamble => target.GetPreamble(); } #endif } diff --git a/src/Split/netcoreapp2.0/EncodingPolyfill.cs b/src/Split/netcoreapp2.0/EncodingPolyfill.cs index b2044b65..8e48dfa5 100644 --- a/src/Split/netcoreapp2.0/EncodingPolyfill.cs +++ b/src/Split/netcoreapp2.0/EncodingPolyfill.cs @@ -1,6 +1,7 @@ // #pragma warning disable namespace Polyfills; +using System; using System.Text; static partial class Polyfill { @@ -18,7 +19,7 @@ static partial class Polyfill /// /// When overridden in a derived class, returns a span containing the sequence of bytes that specifies the encoding used. /// - public System.ReadOnlySpan Preamble => target.GetPreamble(); + public ReadOnlySpan Preamble => target.GetPreamble(); } #endif } diff --git a/src/Split/netcoreapp2.1/EncodingPolyfill.cs b/src/Split/netcoreapp2.1/EncodingPolyfill.cs index 3611d253..573df0b8 100644 --- a/src/Split/netcoreapp2.1/EncodingPolyfill.cs +++ b/src/Split/netcoreapp2.1/EncodingPolyfill.cs @@ -1,6 +1,7 @@ // #pragma warning disable namespace Polyfills; +using System; using System.Text; static partial class Polyfill { diff --git a/src/Split/netcoreapp2.2/EncodingPolyfill.cs b/src/Split/netcoreapp2.2/EncodingPolyfill.cs index 3611d253..573df0b8 100644 --- a/src/Split/netcoreapp2.2/EncodingPolyfill.cs +++ b/src/Split/netcoreapp2.2/EncodingPolyfill.cs @@ -1,6 +1,7 @@ // #pragma warning disable namespace Polyfills; +using System; using System.Text; static partial class Polyfill { diff --git a/src/Split/netcoreapp3.0/EncodingPolyfill.cs b/src/Split/netcoreapp3.0/EncodingPolyfill.cs index 3611d253..573df0b8 100644 --- a/src/Split/netcoreapp3.0/EncodingPolyfill.cs +++ b/src/Split/netcoreapp3.0/EncodingPolyfill.cs @@ -1,6 +1,7 @@ // #pragma warning disable namespace Polyfills; +using System; using System.Text; static partial class Polyfill { diff --git a/src/Split/netcoreapp3.1/EncodingPolyfill.cs b/src/Split/netcoreapp3.1/EncodingPolyfill.cs index 3611d253..573df0b8 100644 --- a/src/Split/netcoreapp3.1/EncodingPolyfill.cs +++ b/src/Split/netcoreapp3.1/EncodingPolyfill.cs @@ -1,6 +1,7 @@ // #pragma warning disable namespace Polyfills; +using System; using System.Text; static partial class Polyfill { diff --git a/src/Split/netstandard2.0/EncodingPolyfill.cs b/src/Split/netstandard2.0/EncodingPolyfill.cs index b2044b65..8e48dfa5 100644 --- a/src/Split/netstandard2.0/EncodingPolyfill.cs +++ b/src/Split/netstandard2.0/EncodingPolyfill.cs @@ -1,6 +1,7 @@ // #pragma warning disable namespace Polyfills; +using System; using System.Text; static partial class Polyfill { @@ -18,7 +19,7 @@ static partial class Polyfill /// /// When overridden in a derived class, returns a span containing the sequence of bytes that specifies the encoding used. /// - public System.ReadOnlySpan Preamble => target.GetPreamble(); + public ReadOnlySpan Preamble => target.GetPreamble(); } #endif } diff --git a/src/Split/netstandard2.1/EncodingPolyfill.cs b/src/Split/netstandard2.1/EncodingPolyfill.cs index 3611d253..573df0b8 100644 --- a/src/Split/netstandard2.1/EncodingPolyfill.cs +++ b/src/Split/netstandard2.1/EncodingPolyfill.cs @@ -1,6 +1,7 @@ // #pragma warning disable namespace Polyfills; +using System; using System.Text; static partial class Polyfill { diff --git a/src/Split/uap10.0/EncodingPolyfill.cs b/src/Split/uap10.0/EncodingPolyfill.cs index b2044b65..8e48dfa5 100644 --- a/src/Split/uap10.0/EncodingPolyfill.cs +++ b/src/Split/uap10.0/EncodingPolyfill.cs @@ -1,6 +1,7 @@ // #pragma warning disable namespace Polyfills; +using System; using System.Text; static partial class Polyfill { @@ -18,7 +19,7 @@ static partial class Polyfill /// /// When overridden in a derived class, returns a span containing the sequence of bytes that specifies the encoding used. /// - public System.ReadOnlySpan Preamble => target.GetPreamble(); + public ReadOnlySpan Preamble => target.GetPreamble(); } #endif }