You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -143,6 +146,7 @@ public static bool IsNullableType(Type nullableType)
143
146
/// A <see cref="Type"/> representing <c>Nullable<T></c> for value types, or the original
144
147
/// <paramref name="type"/> if it is already nullable or a reference type.
145
148
/// </returns>
149
+
[RequiresDynamicCode("Calls Type.MakeGenericType(params Type[]) to build Nullable<T> for value types, which may need to generate new code at runtime.")]
146
150
publicstaticTypeGetNullableType(Typetype)
147
151
{
148
152
if(type==null)
@@ -212,11 +216,13 @@ public static Type GetUnderlyingType(Type type)
212
216
/// <exclude />
213
217
privateclassTypeConverterHelper
214
218
{
219
+
[RequiresUnreferencedCode("Calls TypeDescriptor.GetConverter(Type), which is unsafe to trim.")]
@@ -249,6 +255,7 @@ public static class ValueConvert
249
255
/// <param name="type">The target type.</param>
250
256
/// <param name="provider">A <see cref="IFormatProvider"/> used to format or parse the value.</param>
251
257
/// <returns>The new value in the target type.</returns>
258
+
[RequiresUnreferencedCode("Calls ChangeType(object, Type, IFormatProvider, string, bool), which calls TypeDescriptor.GetConverter(Type) and is unsafe to trim.")]
@@ -263,6 +270,7 @@ public static object ChangeType(object value, Type type, IFormatProvider provide
263
270
/// <param name="returnDbNUllIfNotValid">Indicates whether exceptions should be avoided or catched and return value should be DBNull if
264
271
/// it cannot be converted to the target type.</param>
265
272
/// <returns>The new value in the target type.</returns>
273
+
[RequiresUnreferencedCode("Calls ChangeType(object, Type, IFormatProvider, string, bool), which calls TypeDescriptor.GetConverter(Type) and is unsafe to trim.")]
0 commit comments