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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions apiCount.include.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
**API count: 1170**
**API count: 1172**

### Per Target Framework

Expand All @@ -14,15 +14,15 @@
| `netstandard2.0` | 1074 |
| `netstandard2.1` | 907 |
| `netcoreapp2.0` | 997 |
| `netcoreapp2.1` | 918 |
| `netcoreapp2.2` | 918 |
| `netcoreapp3.0` | 879 |
| `netcoreapp3.1` | 878 |
| `net5.0` | 756 |
| `net6.0` | 652 |
| `net7.0` | 511 |
| `net8.0` | 390 |
| `net9.0` | 243 |
| `netcoreapp2.1` | 920 |
| `netcoreapp2.2` | 920 |
| `netcoreapp3.0` | 881 |
| `netcoreapp3.1` | 880 |
| `net5.0` | 758 |
| `net6.0` | 654 |
| `net7.0` | 513 |
| `net8.0` | 392 |
| `net9.0` | 245 |
| `net10.0` | 182 |
| `net11.0` | 58 |
| `uap10.0` | 1064 |
8 changes: 8 additions & 0 deletions api_list.include.md
Original file line number Diff line number Diff line change
Expand Up @@ -641,6 +641,14 @@
* `ReadOnlyCollection<T> AsReadOnly<T>()` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.collectionextensions.asreadonly?view=net-11.0#system-collections-generic-collectionextensions-asreadonly-1(system-collections-generic-ilist((-0))))


#### ImmutableDictionary

* `ImmutableDictionary<TKey, TValue> CreateRangeWithOverwrite<TKey, TValue>(IEqualityComparer<TKey>?, ReadOnlySpan<KeyValuePair<TKey, TValue>>) where TKey : notnull` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.collections.immutable.immutabledictionary.createrangewithoverwrite?view=net-11.0#system-collections-immutable-immutabledictionary-createrangewithoverwrite-2(system-collections-generic-iequalitycomparer((-0))-system-readonlyspan((system-collections-generic-keyvaluepair((-0-1))))))
* Note: Only available on netcoreapp2.1 and later, since ImmutableDictionary is a separate package below that.
* `ImmutableDictionary<TKey, TValue> CreateRangeWithOverwrite<TKey, TValue>(ReadOnlySpan<KeyValuePair<TKey, TValue>>) where TKey : notnull` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.collections.immutable.immutabledictionary.createrangewithoverwrite?view=net-11.0#system-collections-immutable-immutabledictionary-createrangewithoverwrite-2(system-readonlyspan((system-collections-generic-keyvaluepair((-0-1))))))
* Note: Only available on netcoreapp2.1 and later, since ImmutableDictionary is a separate package below that.


#### Int128

* `Int128 BigMul(Int128, Int128, Int128)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.int128.bigmul?view=net-11.0)
Expand Down
36 changes: 18 additions & 18 deletions assemblySize.include.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
| net48 | 8.5KB | 387.0KB | +378.5KB | +9.0KB | +6.5KB | +9.0KB | +13.5KB |
| net481 | 8.5KB | 387.0KB | +378.5KB | +9.0KB | +6.5KB | +9.0KB | +13.5KB |
| netcoreapp2.0 | 9.0KB | 365.0KB | +356.0KB | +9.0KB | +6.5KB | +9.0KB | +13.5KB |
| netcoreapp2.1 | 9.0KB | 346.0KB | +337.0KB | +9.0KB | +6.5KB | +9.0KB | +14.0KB |
| netcoreapp2.2 | 9.0KB | 346.0KB | +337.0KB | +9.0KB | +6.5KB | +9.0KB | +14.0KB |
| netcoreapp3.0 | 9.5KB | 344.0KB | +334.5KB | +9.0KB | +6.5KB | +9.5KB | +14.0KB |
| netcoreapp3.1 | 9.5KB | 342.5KB | +333.0KB | +9.0KB | +6.5KB | +9.0KB | +13.5KB |
| net5.0 | 9.5KB | 308.0KB | +298.5KB | +9.0KB | +6.5KB | +9.0KB | +14.0KB |
| net6.0 | 10.0KB | 249.0KB | +239.0KB | +9.5KB | +7.0KB | +512bytes | +3.5KB |
| net7.0 | 10.0KB | 217.5KB | +207.5KB | +9.5KB | +6.0KB | +512bytes | +3.5KB |
| net8.0 | 9.5KB | 188.0KB | +178.5KB | +8.5KB | +512bytes | +512bytes | +3.5KB |
| net9.0 | 9.5KB | 117.0KB | +107.5KB | +8.0KB | | +512bytes | +3.0KB |
| netcoreapp2.1 | 9.0KB | 347.0KB | +338.0KB | +9.0KB | +6.5KB | +9.0KB | +14.0KB |
| netcoreapp2.2 | 9.0KB | 347.0KB | +338.0KB | +9.0KB | +6.5KB | +9.0KB | +14.0KB |
| netcoreapp3.0 | 9.5KB | 345.5KB | +336.0KB | +8.5KB | +6.0KB | +9.0KB | +13.5KB |
| netcoreapp3.1 | 9.5KB | 343.5KB | +334.0KB | +9.0KB | +6.5KB | +9.0KB | +14.0KB |
| net5.0 | 9.5KB | 309.0KB | +299.5KB | +9.0KB | +6.5KB | +9.0KB | +14.0KB |
| net6.0 | 10.0KB | 250.0KB | +240.0KB | +10.0KB | +7.0KB | +512bytes | +3.5KB |
| net7.0 | 10.0KB | 218.5KB | +208.5KB | +9.5KB | +6.0KB | +1.0KB | +3.5KB |
| net8.0 | 9.5KB | 189.5KB | +180.0KB | +8.0KB | | +512bytes | +3.0KB |
| net9.0 | 9.5KB | 118.0KB | +108.5KB | +8.5KB | | +512bytes | +3.5KB |
| net10.0 | 10.0KB | 93.5KB | +83.5KB | +8.5KB | | +512bytes | +3.0KB |
| net11.0 | 10.0KB | 21.0KB | +11.0KB | +9.0KB | | +512bytes | +3.5KB |

Expand All @@ -39,14 +39,14 @@
| net48 | 8.5KB | 562.6KB | +554.1KB | +16.7KB | +8.2KB | +13.9KB | +18.9KB |
| net481 | 8.5KB | 562.6KB | +554.1KB | +16.7KB | +8.2KB | +13.9KB | +18.9KB |
| netcoreapp2.0 | 9.0KB | 530.7KB | +521.7KB | +16.7KB | +8.2KB | +13.9KB | +18.9KB |
| netcoreapp2.1 | 9.0KB | 499.0KB | +490.0KB | +16.7KB | +8.2KB | +13.9KB | +19.4KB |
| netcoreapp2.2 | 9.0KB | 499.0KB | +490.0KB | +16.7KB | +8.2KB | +13.9KB | +19.4KB |
| netcoreapp3.0 | 9.5KB | 490.3KB | +480.8KB | +16.7KB | +8.2KB | +14.4KB | +19.4KB |
| netcoreapp3.1 | 9.5KB | 488.8KB | +479.3KB | +16.7KB | +8.2KB | +13.9KB | +18.9KB |
| net5.0 | 9.5KB | 436.9KB | +427.4KB | +16.7KB | +8.2KB | +13.9KB | +19.4KB |
| net6.0 | 10.0KB | 357.7KB | +347.7KB | +17.2KB | +8.7KB | +1.1KB | +4.2KB |
| net7.0 | 10.0KB | 309.3KB | +299.3KB | +17.1KB | +7.4KB | +1.1KB | +4.2KB |
| net8.0 | 9.5KB | 266.1KB | +256.6KB | +16.0KB | +811bytes | +1.1KB | +4.2KB |
| net9.0 | 9.5KB | 169.1KB | +159.6KB | +15.5KB | | +1.1KB | +3.7KB |
| netcoreapp2.1 | 9.0KB | 500.5KB | +491.5KB | +16.7KB | +8.2KB | +13.9KB | +19.4KB |
| netcoreapp2.2 | 9.0KB | 500.5KB | +491.5KB | +16.7KB | +8.2KB | +13.9KB | +19.4KB |
| netcoreapp3.0 | 9.5KB | 492.3KB | +482.8KB | +16.2KB | +7.7KB | +13.9KB | +18.9KB |
| netcoreapp3.1 | 9.5KB | 490.3KB | +480.8KB | +16.7KB | +8.2KB | +13.9KB | +19.4KB |
| net5.0 | 9.5KB | 438.4KB | +428.9KB | +16.7KB | +8.2KB | +13.9KB | +19.4KB |
| net6.0 | 10.0KB | 359.2KB | +349.2KB | +17.7KB | +8.7KB | +1.1KB | +4.2KB |
| net7.0 | 10.0KB | 310.9KB | +300.9KB | +17.1KB | +7.4KB | +1.6KB | +4.2KB |
| net8.0 | 9.5KB | 268.1KB | +258.6KB | +15.5KB | +299bytes | +1.1KB | +3.7KB |
| net9.0 | 9.5KB | 170.6KB | +161.1KB | +16.0KB | | +1.1KB | +4.2KB |
| net10.0 | 10.0KB | 136.1KB | +126.1KB | +16.0KB | | +1.1KB | +3.7KB |
| net11.0 | 10.0KB | 30.9KB | +20.9KB | +16.5KB | | +1.1KB | +4.2KB |
68 changes: 38 additions & 30 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The package targets `netstandard2.0` and is designed to support the following ru
* `uap10`


**API count: 1170**<!-- include: apiCount. path: /apiCount.include.md -->
**API count: 1172**<!-- include: apiCount. path: /apiCount.include.md -->

### Per Target Framework

Expand All @@ -29,15 +29,15 @@ The package targets `netstandard2.0` and is designed to support the following ru
| `netstandard2.0` | 1074 |
| `netstandard2.1` | 907 |
| `netcoreapp2.0` | 997 |
| `netcoreapp2.1` | 918 |
| `netcoreapp2.2` | 918 |
| `netcoreapp3.0` | 879 |
| `netcoreapp3.1` | 878 |
| `net5.0` | 756 |
| `net6.0` | 652 |
| `net7.0` | 511 |
| `net8.0` | 390 |
| `net9.0` | 243 |
| `netcoreapp2.1` | 920 |
| `netcoreapp2.2` | 920 |
| `netcoreapp3.0` | 881 |
| `netcoreapp3.1` | 880 |
| `net5.0` | 758 |
| `net6.0` | 654 |
| `net7.0` | 513 |
| `net8.0` | 392 |
| `net9.0` | 245 |
| `net10.0` | 182 |
| `net11.0` | 58 |
| `uap10.0` | 1064 |
Expand Down Expand Up @@ -106,15 +106,15 @@ This project uses features from the newest stable SDK and C# language. As such c
| net48 | 8.5KB | 387.0KB | +378.5KB | +9.0KB | +6.5KB | +9.0KB | +13.5KB |
| net481 | 8.5KB | 387.0KB | +378.5KB | +9.0KB | +6.5KB | +9.0KB | +13.5KB |
| netcoreapp2.0 | 9.0KB | 365.0KB | +356.0KB | +9.0KB | +6.5KB | +9.0KB | +13.5KB |
| netcoreapp2.1 | 9.0KB | 346.0KB | +337.0KB | +9.0KB | +6.5KB | +9.0KB | +14.0KB |
| netcoreapp2.2 | 9.0KB | 346.0KB | +337.0KB | +9.0KB | +6.5KB | +9.0KB | +14.0KB |
| netcoreapp3.0 | 9.5KB | 344.0KB | +334.5KB | +9.0KB | +6.5KB | +9.5KB | +14.0KB |
| netcoreapp3.1 | 9.5KB | 342.5KB | +333.0KB | +9.0KB | +6.5KB | +9.0KB | +13.5KB |
| net5.0 | 9.5KB | 308.0KB | +298.5KB | +9.0KB | +6.5KB | +9.0KB | +14.0KB |
| net6.0 | 10.0KB | 249.0KB | +239.0KB | +9.5KB | +7.0KB | +512bytes | +3.5KB |
| net7.0 | 10.0KB | 217.5KB | +207.5KB | +9.5KB | +6.0KB | +512bytes | +3.5KB |
| net8.0 | 9.5KB | 188.0KB | +178.5KB | +8.5KB | +512bytes | +512bytes | +3.5KB |
| net9.0 | 9.5KB | 117.0KB | +107.5KB | +8.0KB | | +512bytes | +3.0KB |
| netcoreapp2.1 | 9.0KB | 347.0KB | +338.0KB | +9.0KB | +6.5KB | +9.0KB | +14.0KB |
| netcoreapp2.2 | 9.0KB | 347.0KB | +338.0KB | +9.0KB | +6.5KB | +9.0KB | +14.0KB |
| netcoreapp3.0 | 9.5KB | 345.5KB | +336.0KB | +8.5KB | +6.0KB | +9.0KB | +13.5KB |
| netcoreapp3.1 | 9.5KB | 343.5KB | +334.0KB | +9.0KB | +6.5KB | +9.0KB | +14.0KB |
| net5.0 | 9.5KB | 309.0KB | +299.5KB | +9.0KB | +6.5KB | +9.0KB | +14.0KB |
| net6.0 | 10.0KB | 250.0KB | +240.0KB | +10.0KB | +7.0KB | +512bytes | +3.5KB |
| net7.0 | 10.0KB | 218.5KB | +208.5KB | +9.5KB | +6.0KB | +1.0KB | +3.5KB |
| net8.0 | 9.5KB | 189.5KB | +180.0KB | +8.0KB | | +512bytes | +3.0KB |
| net9.0 | 9.5KB | 118.0KB | +108.5KB | +8.5KB | | +512bytes | +3.5KB |
| net10.0 | 10.0KB | 93.5KB | +83.5KB | +8.5KB | | +512bytes | +3.0KB |
| net11.0 | 10.0KB | 21.0KB | +11.0KB | +9.0KB | | +512bytes | +3.5KB |

Expand All @@ -133,15 +133,15 @@ This project uses features from the newest stable SDK and C# language. As such c
| net48 | 8.5KB | 562.6KB | +554.1KB | +16.7KB | +8.2KB | +13.9KB | +18.9KB |
| net481 | 8.5KB | 562.6KB | +554.1KB | +16.7KB | +8.2KB | +13.9KB | +18.9KB |
| netcoreapp2.0 | 9.0KB | 530.7KB | +521.7KB | +16.7KB | +8.2KB | +13.9KB | +18.9KB |
| netcoreapp2.1 | 9.0KB | 499.0KB | +490.0KB | +16.7KB | +8.2KB | +13.9KB | +19.4KB |
| netcoreapp2.2 | 9.0KB | 499.0KB | +490.0KB | +16.7KB | +8.2KB | +13.9KB | +19.4KB |
| netcoreapp3.0 | 9.5KB | 490.3KB | +480.8KB | +16.7KB | +8.2KB | +14.4KB | +19.4KB |
| netcoreapp3.1 | 9.5KB | 488.8KB | +479.3KB | +16.7KB | +8.2KB | +13.9KB | +18.9KB |
| net5.0 | 9.5KB | 436.9KB | +427.4KB | +16.7KB | +8.2KB | +13.9KB | +19.4KB |
| net6.0 | 10.0KB | 357.7KB | +347.7KB | +17.2KB | +8.7KB | +1.1KB | +4.2KB |
| net7.0 | 10.0KB | 309.3KB | +299.3KB | +17.1KB | +7.4KB | +1.1KB | +4.2KB |
| net8.0 | 9.5KB | 266.1KB | +256.6KB | +16.0KB | +811bytes | +1.1KB | +4.2KB |
| net9.0 | 9.5KB | 169.1KB | +159.6KB | +15.5KB | | +1.1KB | +3.7KB |
| netcoreapp2.1 | 9.0KB | 500.5KB | +491.5KB | +16.7KB | +8.2KB | +13.9KB | +19.4KB |
| netcoreapp2.2 | 9.0KB | 500.5KB | +491.5KB | +16.7KB | +8.2KB | +13.9KB | +19.4KB |
| netcoreapp3.0 | 9.5KB | 492.3KB | +482.8KB | +16.2KB | +7.7KB | +13.9KB | +18.9KB |
| netcoreapp3.1 | 9.5KB | 490.3KB | +480.8KB | +16.7KB | +8.2KB | +13.9KB | +19.4KB |
| net5.0 | 9.5KB | 438.4KB | +428.9KB | +16.7KB | +8.2KB | +13.9KB | +19.4KB |
| net6.0 | 10.0KB | 359.2KB | +349.2KB | +17.7KB | +8.7KB | +1.1KB | +4.2KB |
| net7.0 | 10.0KB | 310.9KB | +300.9KB | +17.1KB | +7.4KB | +1.6KB | +4.2KB |
| net8.0 | 9.5KB | 268.1KB | +258.6KB | +15.5KB | +299bytes | +1.1KB | +3.7KB |
| net9.0 | 9.5KB | 170.6KB | +161.1KB | +16.0KB | | +1.1KB | +4.2KB |
| net10.0 | 10.0KB | 136.1KB | +126.1KB | +16.0KB | | +1.1KB | +3.7KB |
| net11.0 | 10.0KB | 30.9KB | +20.9KB | +16.5KB | | +1.1KB | +4.2KB |
<!-- endInclude -->
Expand Down Expand Up @@ -1256,6 +1256,14 @@ The class `Polyfill` includes the following extension methods:
* `ReadOnlyCollection<T> AsReadOnly<T>()` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.collectionextensions.asreadonly?view=net-11.0#system-collections-generic-collectionextensions-asreadonly-1(system-collections-generic-ilist((-0))))


#### ImmutableDictionary

* `ImmutableDictionary<TKey, TValue> CreateRangeWithOverwrite<TKey, TValue>(IEqualityComparer<TKey>?, ReadOnlySpan<KeyValuePair<TKey, TValue>>) where TKey : notnull` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.collections.immutable.immutabledictionary.createrangewithoverwrite?view=net-11.0#system-collections-immutable-immutabledictionary-createrangewithoverwrite-2(system-collections-generic-iequalitycomparer((-0))-system-readonlyspan((system-collections-generic-keyvaluepair((-0-1))))))
* Note: Only available on netcoreapp2.1 and later, since ImmutableDictionary is a separate package below that.
* `ImmutableDictionary<TKey, TValue> CreateRangeWithOverwrite<TKey, TValue>(ReadOnlySpan<KeyValuePair<TKey, TValue>>) where TKey : notnull` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.collections.immutable.immutabledictionary.createrangewithoverwrite?view=net-11.0#system-collections-immutable-immutabledictionary-createrangewithoverwrite-2(system-readonlyspan((system-collections-generic-keyvaluepair((-0-1))))))
* Note: Only available on netcoreapp2.1 and later, since ImmutableDictionary is a separate package below that.


#### Int128

* `Int128 BigMul(Int128, Int128, Int128)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.int128.bigmul?view=net-11.0)
Expand Down Expand Up @@ -2607,7 +2615,7 @@ void ObjectDisposedExceptionExample(bool isDisposed)
ObjectDisposedException.ThrowIf(isDisposed, typeof(Consume));
}
```
<sup><a href='/src/Consume/Consume.cs#L976-L1000' title='Snippet source file'>snippet source</a> | <a href='#snippet-ArgumentExceptionUsage' title='Start of snippet'>anchor</a></sup>
<sup><a href='/src/Consume/Consume.cs#L988-L1012' title='Snippet source file'>snippet source</a> | <a href='#snippet-ArgumentExceptionUsage' title='Start of snippet'>anchor</a></sup>
<!-- endSnippet -->


Expand All @@ -2626,7 +2634,7 @@ void EnsureExample(Order order, Customer customer, string customerId, string ema
this.quantity = Ensure.NotNegativeOrZero(quantity);
}
```
<sup><a href='/src/Consume/Consume.cs#L1006-L1018' title='Snippet source file'>snippet source</a> | <a href='#snippet-EnsureUsage' title='Start of snippet'>anchor</a></sup>
<sup><a href='/src/Consume/Consume.cs#L1018-L1030' title='Snippet source file'>snippet source</a> | <a href='#snippet-EnsureUsage' title='Start of snippet'>anchor</a></sup>
<!-- endSnippet -->


Expand Down
12 changes: 12 additions & 0 deletions src/Consume/Consume.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ namespace Consumes;
using System.Collections;
using System.Collections.Concurrent;
using System.Collections.Generic;
#if NETCOREAPP2_1_OR_GREATER
using System.Collections.Immutable;
#endif
using System.Collections.ObjectModel;
using System.Collections.Specialized;
using System.Diagnostics;
Expand Down Expand Up @@ -216,6 +219,15 @@ void StringBuilder_ParamsSpan_Methods()
}
#endif

#if NETCOREAPP2_1_OR_GREATER
void ImmutableDictionary_Methods()
{
ReadOnlySpan<KeyValuePair<string, int>> items = new KeyValuePair<string, int>[] { new("a", 1) };
var withOverwrite = ImmutableDictionary.CreateRangeWithOverwrite<string, int>(items);
withOverwrite = ImmutableDictionary.CreateRangeWithOverwrite(StringComparer.Ordinal, items);
}
#endif

void Interlocked_Narrow_Methods()
{
byte unsignedByte = 0;
Expand Down
Loading
Loading