Skip to content

Commit 368fa1d

Browse files
[main] Update dependencies from dotnet/efcore dotnet/runtime (#30796)
[main] Update dependencies from dotnet/efcore dotnet/runtime - React to trimmer attributes
1 parent b50e925 commit 368fa1d

9 files changed

+238
-234
lines changed

eng/Version.Details.xml

Lines changed: 148 additions & 148 deletions
Large diffs are not rendered by default.

eng/Versions.props

Lines changed: 74 additions & 74 deletions
Large diffs are not rendered by default.

src/Components/Components/src/BindConverter.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ private static string FormatDateTimeOffsetValueCore(DateTimeOffset value, Cultur
505505
/// </param>
506506
/// <returns>The formatted value.</returns>
507507
[SuppressMessage("ApiDesign", "RS0026:Do not add multiple public overloads with optional parameters", Justification = "Required to maintain compatibility")]
508-
public static object? FormatValue<T>(T value, CultureInfo? culture = null)
508+
public static object? FormatValue<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] T>(T value, CultureInfo? culture = null)
509509
{
510510
var formatter = FormatterDelegateCache.Get<T>();
511511
return formatter(value, culture);
@@ -1270,7 +1270,7 @@ private static bool ConvertToNullableEnum<T>(object? obj, CultureInfo? culture,
12701270
/// <param name="culture">The <see cref="CultureInfo"/> to use for conversion.</param>
12711271
/// <param name="value">The converted value.</param>
12721272
/// <returns><c>true</c> if conversion is successful, otherwise <c>false</c>.</returns>
1273-
public static bool TryConvertTo<T>(object? obj, CultureInfo? culture, [MaybeNullWhen(false)] out T value)
1273+
public static bool TryConvertTo<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] T>(object? obj, CultureInfo? culture, [MaybeNullWhen(false)] out T value)
12741274
{
12751275
var converter = ParserDelegateCache.Get<T>();
12761276
return converter(obj, culture, out value);
@@ -1280,7 +1280,7 @@ private static class FormatterDelegateCache
12801280
{
12811281
private readonly static ConcurrentDictionary<Type, Delegate> _cache = new ConcurrentDictionary<Type, Delegate>();
12821282

1283-
public static BindFormatter<T> Get<T>()
1283+
public static BindFormatter<T> Get<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] T>()
12841284
{
12851285
if (!_cache.TryGetValue(typeof(T), out var formatter))
12861286
{
@@ -1377,7 +1377,7 @@ public static BindFormatter<T> Get<T>()
13771377
return (BindFormatter<T>)formatter;
13781378
}
13791379

1380-
private static BindFormatter<T> MakeTypeConverterFormatter<T>()
1380+
private static BindFormatter<T> MakeTypeConverterFormatter<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] T>()
13811381
{
13821382
var typeConverter = TypeDescriptor.GetConverter(typeof(T));
13831383
if (typeConverter == null || !typeConverter.CanConvertTo(typeof(string)))
@@ -1409,7 +1409,7 @@ internal static class ParserDelegateCache
14091409
"ReflectionAnalysis",
14101410
"IL2060:MakeGenericMethod",
14111411
Justification = "The referenced methods don't have any DynamicallyAccessedMembers annotations. See https://github.com/mono/linker/issues/1727")]
1412-
public static BindParser<T> Get<T>()
1412+
public static BindParser<T> Get<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] T>()
14131413
{
14141414
if (!_cache.TryGetValue(typeof(T), out var parser))
14151415
{
@@ -1514,7 +1514,7 @@ public static BindParser<T> Get<T>()
15141514
return (BindParser<T>)parser;
15151515
}
15161516

1517-
private static BindParser<T> MakeTypeConverterConverter<T>()
1517+
private static BindParser<T> MakeTypeConverterConverter<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] T>()
15181518
{
15191519
var typeConverter = TypeDescriptor.GetConverter(typeof(T));
15201520
if (typeConverter == null || !typeConverter.CanConvertFrom(typeof(string)))

src/Components/Components/src/EventCallbackFactoryBinderExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ public static EventCallback<ChangeEventArgs> CreateBinder(
502502
/// <param name="culture"></param>
503503
/// <returns></returns>
504504
[SuppressMessage("ApiDesign", "RS0026:Do not add multiple public overloads with optional parameters", Justification = "Required to maintain compatibility")]
505-
public static EventCallback<ChangeEventArgs> CreateBinder<T>(
505+
public static EventCallback<ChangeEventArgs> CreateBinder<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] T>(
506506
this EventCallbackFactory factory,
507507
object receiver,
508508
Action<T> setter,

src/Components/Web/src/Forms/InputExtensions.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ namespace Microsoft.AspNetCore.Components.Forms
99
{
1010
internal static class InputExtensions
1111
{
12-
public static bool TryParseSelectableValueFromString<TValue>(this InputBase<TValue> input, string? value, [MaybeNullWhen(false)] out TValue result, [NotNullWhen(false)] out string? validationErrorMessage)
12+
public static bool TryParseSelectableValueFromString<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] TValue>(
13+
this InputBase<TValue> input, string? value,
14+
[MaybeNullWhen(false)] out TValue result,
15+
[NotNullWhen(false)] out string? validationErrorMessage)
1316
{
1417
try
1518
{

src/Components/Web/src/Forms/InputNumber.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ namespace Microsoft.AspNetCore.Components.Forms
1212
/// An input component for editing numeric values.
1313
/// Supported numeric types are <see cref="int"/>, <see cref="long"/>, <see cref="short"/>, <see cref="float"/>, <see cref="double"/>, <see cref="decimal"/>.
1414
/// </summary>
15-
public class InputNumber<TValue> : InputBase<TValue>
15+
public class InputNumber<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] TValue> : InputBase<TValue>
1616
{
1717
private readonly static string _stepAttributeValue; // Null by default, so only allows whole numbers as per HTML spec
1818

src/Components/Web/src/Forms/InputRadio.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
using System;
55
using System.Collections.Generic;
66
using System.Diagnostics;
7+
using System.Diagnostics.CodeAnalysis;
78
using System.Globalization;
89
using Microsoft.AspNetCore.Components.Rendering;
910

@@ -12,7 +13,7 @@ namespace Microsoft.AspNetCore.Components.Forms
1213
/// <summary>
1314
/// An input component used for selecting a value from a group of choices.
1415
/// </summary>
15-
public class InputRadio<TValue> : ComponentBase
16+
public class InputRadio<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] TValue> : ComponentBase
1617
{
1718
/// <summary>
1819
/// Gets context for this <see cref="InputRadio{TValue}"/>.

src/Components/Web/src/Forms/InputRadioGroup.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ namespace Microsoft.AspNetCore.Components.Forms
1111
/// <summary>
1212
/// Groups child <see cref="InputRadio{TValue}"/> components.
1313
/// </summary>
14-
public class InputRadioGroup<TValue> : InputBase<TValue>
14+
public class InputRadioGroup<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] TValue> : InputBase<TValue>
1515
{
1616
private readonly string _defaultGroupName = Guid.NewGuid().ToString("N");
1717
private InputRadioContext? _context;

src/Components/Web/src/Forms/InputSelect.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace Microsoft.AspNetCore.Components.Forms
99
/// <summary>
1010
/// A dropdown selection component.
1111
/// </summary>
12-
public class InputSelect<TValue> : InputBase<TValue>
12+
public class InputSelect<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] TValue> : InputBase<TValue>
1313
{
1414
/// <summary>
1515
/// Gets or sets the child content to be rendering inside the select element.

0 commit comments

Comments
 (0)