Skip to content

Commit 3340419

Browse files
authored
More uap (#439)
1 parent 7b8abef commit 3340419

37 files changed

+684
-233
lines changed

apiCount.include.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
**API count: 646**
1+
**API count: 647**

api_list.include.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -805,6 +805,7 @@
805805
#### Type
806806

807807
* `MemberInfo GetMemberWithSameMetadataDefinitionAs(MemberInfo)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.type.getmemberwithsamemetadatadefinitionas?view=net-10.0)
808+
* `MethodInfo? GetMethod(string, int, BindingFlags, Binder?, Type[], ParameterModifier[]?)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.type.getmethod?view=net-10.0#system-type-getmethod(system-string-system-int32-system-reflection-bindingflags-system-reflection-binder-system-type()-system-reflection-parametermodifier()))
808809
* `MethodInfo? GetMethod(string, int, BindingFlags, Type[])` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.type.getmethod?view=net-10.0#system-type-getmethod(system-string-system-int32-system-reflection-bindingflags-system-type()))
809810
* `bool IsAssignableFrom<T>()`
810811
* `bool IsAssignableTo(Type?)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.type.isassignableto?view=net-10.0)

assemblySize.include.md

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22

33
| | Empty Assembly | With Polyfill | Diff | Ensure | ArgumentExceptions | StringInterpolation | Nullability |
44
|----------------|----------------|---------------|-----------|-----------|--------------------|---------------------|-------------|
5-
| netstandard2.0 | 8.0 KB | 184.0 KB | +176.0 KB | +8.5 KB | +5.5 KB | +9.0 KB | +14.0 KB |
5+
| netstandard2.0 | 8.0 KB | 185.5 KB | +177.5 KB | +8.5 KB | +5.0 KB | +9.0 KB | +13.5 KB |
66
| netstandard2.1 | 8.5 KB | 148.0 KB | +139.5 KB | +8.5 KB | +5.0 KB | +9.0 KB | +14.0 KB |
7-
| net461 | 7.0 KB | 189.0 KB | +182.0 KB | +8.5 KB | +5.5 KB | +9.0 KB | +14.0 KB |
8-
| net462 | 7.0 KB | 189.0 KB | +182.0 KB | +8.5 KB | +5.5 KB | +9.0 KB | +14.0 KB |
9-
| net47 | 7.0 KB | 189.0 KB | +182.0 KB | +8.5 KB | +5.0 KB | +9.0 KB | +13.5 KB |
10-
| net471 | 8.5 KB | 189.0 KB | +180.5 KB | +8.5 KB | +5.5 KB | +9.0 KB | +14.0 KB |
11-
| net472 | 8.5 KB | 187.5 KB | +179.0 KB | +8.5 KB | +5.5 KB | +9.0 KB | +14.0 KB |
12-
| net48 | 8.5 KB | 187.5 KB | +179.0 KB | +8.5 KB | +5.5 KB | +9.0 KB | +14.0 KB |
13-
| net481 | 8.5 KB | 187.5 KB | +179.0 KB | +8.5 KB | +5.5 KB | +9.0 KB | +14.0 KB |
14-
| netcoreapp2.0 | 9.0 KB | 165.0 KB | +156.0 KB | +8.0 KB | +5.0 KB | +8.5 KB | +13.5 KB |
7+
| net461 | 7.0 KB | 190.5 KB | +183.5 KB | +8.5 KB | +5.0 KB | +9.0 KB | +13.5 KB |
8+
| net462 | 7.0 KB | 190.5 KB | +183.5 KB | +8.5 KB | +5.0 KB | +9.0 KB | +13.5 KB |
9+
| net47 | 7.0 KB | 190.0 KB | +183.0 KB | +8.5 KB | +5.5 KB | +9.0 KB | +14.0 KB |
10+
| net471 | 8.5 KB | 190.0 KB | +181.5 KB | +8.5 KB | +5.5 KB | +9.0 KB | +14.0 KB |
11+
| net472 | 8.5 KB | 189.0 KB | +180.5 KB | +8.5 KB | +5.0 KB | +9.0 KB | +13.5 KB |
12+
| net48 | 8.5 KB | 189.0 KB | +180.5 KB | +8.5 KB | +5.0 KB | +9.0 KB | +13.5 KB |
13+
| net481 | 8.5 KB | 189.0 KB | +180.5 KB | +8.5 KB | +5.5 KB | +9.0 KB | +13.5 KB |
14+
| netcoreapp2.0 | 9.0 KB | 166.0 KB | +157.0 KB | +8.5 KB | +5.0 KB | +9.0 KB | +13.5 KB |
1515
| netcoreapp2.1 | 9.0 KB | 157.5 KB | +148.5 KB | +8.5 KB | +5.0 KB | +9.0 KB | +14.0 KB |
1616
| netcoreapp2.2 | 9.0 KB | 157.5 KB | +148.5 KB | +8.5 KB | +5.0 KB | +9.0 KB | +14.0 KB |
1717
| netcoreapp3.0 | 9.5 KB | 151.5 KB | +142.0 KB | +8.5 KB | +5.5 KB | +9.5 KB | +14.0 KB |
@@ -28,23 +28,23 @@
2828

2929
| | Empty Assembly | With Polyfill | Diff | Ensure | ArgumentExceptions | StringInterpolation | Nullability |
3030
|----------------|----------------|---------------|-----------|-----------|--------------------|---------------------|-------------|
31-
| netstandard2.0 | 8.0 KB | 292.0 KB | +284.0 KB | +16.4 KB | +7.0 KB | +14.4 KB | +19.9 KB |
32-
| netstandard2.1 | 8.5 KB | 236.7 KB | +228.2 KB | +16.4 KB | +6.5 KB | +14.4 KB | +19.9 KB |
33-
| net461 | 7.0 KB | 297.5 KB | +290.5 KB | +16.4 KB | +7.0 KB | +14.4 KB | +19.9 KB |
34-
| net462 | 7.0 KB | 297.5 KB | +290.5 KB | +16.4 KB | +7.0 KB | +14.4 KB | +19.9 KB |
35-
| net47 | 7.0 KB | 297.2 KB | +290.2 KB | +16.4 KB | +6.5 KB | +14.4 KB | +19.4 KB |
36-
| net471 | 8.5 KB | 297.2 KB | +288.7 KB | +16.4 KB | +7.0 KB | +14.4 KB | +19.9 KB |
37-
| net472 | 8.5 KB | 294.6 KB | +286.1 KB | +16.4 KB | +7.0 KB | +14.4 KB | +19.9 KB |
38-
| net48 | 8.5 KB | 294.6 KB | +286.1 KB | +16.4 KB | +7.0 KB | +14.4 KB | +19.9 KB |
39-
| net481 | 8.5 KB | 294.6 KB | +286.1 KB | +16.4 KB | +7.0 KB | +14.4 KB | +19.9 KB |
40-
| netcoreapp2.0 | 9.0 KB | 263.6 KB | +254.6 KB | +15.9 KB | +6.5 KB | +13.9 KB | +19.4 KB |
41-
| netcoreapp2.1 | 9.0 KB | 249.9 KB | +240.9 KB | +16.4 KB | +6.5 KB | +14.4 KB | +19.9 KB |
42-
| netcoreapp2.2 | 9.0 KB | 249.9 KB | +240.9 KB | +16.4 KB | +6.5 KB | +14.4 KB | +19.9 KB |
43-
| netcoreapp3.0 | 9.5 KB | 236.5 KB | +227.0 KB | +16.4 KB | +7.0 KB | +14.9 KB | +19.9 KB |
44-
| netcoreapp3.1 | 9.5 KB | 235.0 KB | +225.5 KB | +16.4 KB | +6.5 KB | +14.4 KB | +19.9 KB |
45-
| net5.0 | 9.5 KB | 210.2 KB | +200.7 KB | +16.4 KB | +6.5 KB | +14.4 KB | +19.4 KB |
46-
| net6.0 | 10.0 KB | 165.1 KB | +155.1 KB | +16.9 KB | +6.4 KB | +1.6 KB | +4.5 KB |
47-
| net7.0 | 10.0 KB | 129.5 KB | +119.5 KB | +16.8 KB | +6.3 KB | +2.1 KB | +4.5 KB |
48-
| net8.0 | 9.5 KB | 102.6 KB | +93.1 KB | +16.3 KB | +1.8 KB | +1.6 KB | +4.5 KB |
49-
| net9.0 | 10.0 KB | 62.2 KB | +52.2 KB | +16.8 KB | +1.7 KB | +2.1 KB | +5.0 KB |
50-
| net10.0 | 10.0 KB | 48.5 KB | +38.5 KB | +17.3 KB | +2.2 KB | +2.1 KB | +5.0 KB |
31+
| netstandard2.0 | 8.0 KB | 292.1 KB | +284.1 KB | +16.2 KB | +6.4 KB | +14.4 KB | +19.3 KB |
32+
| netstandard2.1 | 8.5 KB | 235.3 KB | +226.8 KB | +16.2 KB | +6.4 KB | +14.4 KB | +19.8 KB |
33+
| net461 | 7.0 KB | 297.6 KB | +290.6 KB | +16.2 KB | +6.4 KB | +14.4 KB | +19.3 KB |
34+
| net462 | 7.0 KB | 297.6 KB | +290.6 KB | +16.2 KB | +6.4 KB | +14.4 KB | +19.3 KB |
35+
| net47 | 7.0 KB | 296.8 KB | +289.8 KB | +16.2 KB | +6.9 KB | +14.4 KB | +19.8 KB |
36+
| net471 | 8.5 KB | 296.8 KB | +288.3 KB | +16.2 KB | +6.9 KB | +14.4 KB | +19.8 KB |
37+
| net472 | 8.5 KB | 294.7 KB | +286.2 KB | +16.2 KB | +6.4 KB | +14.4 KB | +19.3 KB |
38+
| net48 | 8.5 KB | 294.7 KB | +286.2 KB | +16.2 KB | +6.4 KB | +14.4 KB | +19.3 KB |
39+
| net481 | 8.5 KB | 294.7 KB | +286.2 KB | +16.2 KB | +6.9 KB | +14.4 KB | +19.3 KB |
40+
| netcoreapp2.0 | 9.0 KB | 263.3 KB | +254.3 KB | +16.2 KB | +6.4 KB | +14.4 KB | +19.3 KB |
41+
| netcoreapp2.1 | 9.0 KB | 248.4 KB | +239.4 KB | +16.2 KB | +6.4 KB | +14.4 KB | +19.8 KB |
42+
| netcoreapp2.2 | 9.0 KB | 248.4 KB | +239.4 KB | +16.2 KB | +6.4 KB | +14.4 KB | +19.8 KB |
43+
| netcoreapp3.0 | 9.5 KB | 235.1 KB | +225.6 KB | +16.2 KB | +6.9 KB | +14.9 KB | +19.8 KB |
44+
| netcoreapp3.1 | 9.5 KB | 233.5 KB | +224.0 KB | +16.2 KB | +6.4 KB | +14.4 KB | +19.8 KB |
45+
| net5.0 | 9.5 KB | 208.9 KB | +199.4 KB | +16.2 KB | +6.4 KB | +14.4 KB | +19.3 KB |
46+
| net6.0 | 10.0 KB | 163.9 KB | +153.9 KB | +16.7 KB | +6.4 KB | +1.6 KB | +4.5 KB |
47+
| net7.0 | 10.0 KB | 128.5 KB | +118.5 KB | +16.7 KB | +6.3 KB | +2.1 KB | +4.5 KB |
48+
| net8.0 | 9.5 KB | 101.7 KB | +92.2 KB | +16.2 KB | +1.8 KB | +1.6 KB | +4.5 KB |
49+
| net9.0 | 10.0 KB | 61.5 KB | +51.5 KB | +16.7 KB | +1.6 KB | +2.1 KB | +5.0 KB |
50+
| net10.0 | 10.0 KB | 47.9 KB | +37.9 KB | +17.2 KB | +2.1 KB | +2.1 KB | +5.0 KB |

readme.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ The package targets `netstandard2.0` and is designed to support the following ru
1313
* `uap10`
1414

1515

16-
**API count: 646**<!-- singleLineInclude: apiCount. path: /apiCount.include.md -->
16+
**API count: 647**<!-- singleLineInclude: apiCount. path: /apiCount.include.md -->
1717

1818

1919
**See [Milestones](../../milestones?state=closed) for release notes.**
@@ -1250,6 +1250,7 @@ The class `Polyfill` includes the following extension methods:
12501250
#### Type
12511251

12521252
* `MemberInfo GetMemberWithSameMetadataDefinitionAs(MemberInfo)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.type.getmemberwithsamemetadatadefinitionas?view=net-10.0)
1253+
* `MethodInfo? GetMethod(string, int, BindingFlags, Binder?, Type[], ParameterModifier[]?)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.type.getmethod?view=net-10.0#system-type-getmethod(system-string-system-int32-system-reflection-bindingflags-system-reflection-binder-system-type()-system-reflection-parametermodifier()))
12531254
* `MethodInfo? GetMethod(string, int, BindingFlags, Type[])` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.type.getmethod?view=net-10.0#system-type-getmethod(system-string-system-int32-system-reflection-bindingflags-system-type()))
12541255
* `bool IsAssignableFrom<T>()`
12551256
* `bool IsAssignableTo(Type?)` [reference](https://learn.microsoft.com/en-us/dotnet/api/system.type.isassignableto?view=net-10.0)
@@ -1576,7 +1577,7 @@ void ArgumentExceptionExample(Order order, Customer customer, string customerId,
15761577
this.quantity = quantity;
15771578
}
15781579
```
1579-
<sup><a href='/src/Consume/Consume.cs#L378-L396' title='Snippet source file'>snippet source</a> | <a href='#snippet-ArgumentExceptionUsage' title='Start of snippet'>anchor</a></sup>
1580+
<sup><a href='/src/Consume/Consume.cs#L384-L402' title='Snippet source file'>snippet source</a> | <a href='#snippet-ArgumentExceptionUsage' title='Start of snippet'>anchor</a></sup>
15801581
<!-- endSnippet -->
15811582

15821583

@@ -1595,7 +1596,7 @@ void EnsureExample(Order order, Customer customer, string customerId, string ema
15951596
this.quantity = Ensure.NotNegativeOrZero(quantity);
15961597
}
15971598
```
1598-
<sup><a href='/src/Consume/Consume.cs#L402-L414' title='Snippet source file'>snippet source</a> | <a href='#snippet-EnsureUsage' title='Start of snippet'>anchor</a></sup>
1599+
<sup><a href='/src/Consume/Consume.cs#L408-L420' title='Snippet source file'>snippet source</a> | <a href='#snippet-EnsureUsage' title='Start of snippet'>anchor</a></sup>
15991600
<!-- endSnippet -->
16001601

16011602

src/Consume/Consume.cs

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -295,20 +295,26 @@ async Task CancellationTokenSource_Methods()
295295
}
296296

297297

298-
#if !NETFRAMEWORK && !NETSTANDARD2_0 && !NETCOREAPP2_0
299-
class WithGenericMethod
298+
class WithMethods
300299
{
301-
public void GenericMethod<T>(string value)
302-
{
303-
}
300+
public void NonGenericMethod(string value) { }
301+
public void GenericMethod<T>(string value) { }
302+
public void GenericMethod<T1, T2>(string value, int count) { }
304303
}
305304

306305
void Type_GetMethod()
307306
{
308-
var type = typeof(WithGenericMethod);
309-
type.GetMethod("GenericMethod", 1, BindingFlags.Public, [typeof(string)]);
307+
var type = typeof(WithMethods);
308+
309+
// Non-generic method
310+
var nonGeneric = type.GetMethod("NonGenericMethod", 0, BindingFlags.Public | BindingFlags.Instance, [typeof(string)]);
311+
312+
// Generic method with 1 type parameter
313+
var generic1 = type.GetMethod("GenericMethod", 1, BindingFlags.Public | BindingFlags.Instance, [typeof(string)]);
314+
315+
// Generic method with 2 type parameters
316+
var generic2 = type.GetMethod("GenericMethod", 2, BindingFlags.Public | BindingFlags.Instance, [typeof(string), typeof(int)]);
310317
}
311-
#endif
312318

313319
void ConcurrentDictionary_Methods()
314320
{

src/Polyfill/KeyValuePair.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if NETFRAMEWORK || NETSTANDARD2_0
1+
#if (NETFRAMEWORK || NETSTANDARD2_0) && !WINDOWS_UWP
22
#nullable enable
33

44
namespace System.Collections.Generic;

src/Polyfill/Polyfill_Dictionary.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public static ReadOnlyDictionary<TKey, TValue> AsReadOnly<TKey, TValue>(this IDi
1616
new(target);
1717
#endif
1818

19-
#if NETFRAMEWORK || NETSTANDARD2_0
19+
#if (NETFRAMEWORK || NETSTANDARD2_0) && !WINDOWS_UWP
2020

2121
/// <summary>
2222
/// Attempts to add the specified key and value to the <see cref="IDictionary{TKey,TValue}"/>.

src/Polyfill/Polyfill_IEnumerable_SkipLast.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if NETFRAMEWORK || NETSTANDARD2_0
1+
#if (NETFRAMEWORK || NETSTANDARD2_0) && !WINDOWS_UWP
22

33
namespace Polyfills;
44

src/Polyfill/Polyfill_IEnumerable_TakeLast.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33

44

5-
#if NETSTANDARD2_0 || NETFRAMEWORK
5+
#if (NETSTANDARD2_0 || NETFRAMEWORK) && !WINDOWS_UWP
66

77
namespace Polyfills;
88

src/Polyfill/Polyfill_IReadOnlyDictionary.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if NETFRAMEWORK || NETSTANDARD2_0
1+
#if (NETFRAMEWORK || NETSTANDARD2_0) && !WINDOWS_UWP
22
#pragma warning disable CS8714
33

44
namespace Polyfills;

0 commit comments

Comments
 (0)