@@ -54,7 +54,7 @@ internal static class ObjectMethodExecutorFSharpSupport
54
54
/// by the coercer expression, if it was possible to build a coercer; otherwise, <see langword="null"/>.
55
55
/// </param>
56
56
/// <returns><see langword="true"/> if it was possible to build a coercer; otherwise, <see langword="false"/>.</returns>
57
- [ UnconditionalSuppressMessage ( "Trimmer" , "IL2060" , Justification = "Reflecting over the async FSharpAsync<> contract." ) ]
57
+ [ RequiresUnreferencedCode ( "Reflecting over the async FSharpAsync<> contract." ) ]
58
58
public static bool TryBuildCoercerFromFSharpAsyncToAwaitable (
59
59
Type possibleFSharpAsyncType ,
60
60
out Expression coerceToAwaitableExpression ,
@@ -127,7 +127,7 @@ public static bool TryBuildCoercerFromFSharpAsyncToAwaitable(
127
127
/// otherwise, <see langword="null"/>.
128
128
/// </param>
129
129
/// <returns><see langword="true"/> if it was possible to build a coercer; otherwise, <see langword="false"/>.</returns>
130
- [ UnconditionalSuppressMessage ( "Trimmer" , "IL2060" , Justification = "Reflecting over FSharp.Core.Unit." ) ]
130
+ [ RequiresUnreferencedCode ( "Reflecting over FSharp.Core.Unit." ) ]
131
131
public static bool TryBuildCoercerFromUnitAwaitableToVoidAwaitable (
132
132
Type genericAwaitableType ,
133
133
out Expression coercerExpression ,
@@ -168,12 +168,15 @@ static Expression MakeValueTaskOfUnitToValueTaskExpression(Type type)
168
168
}
169
169
}
170
170
171
+ [ RequiresUnreferencedCode ( "Reflecting over the async FSharpAsync<> contract." ) ]
171
172
private static bool IsFSharpAsyncOpenGenericType ( Type possibleFSharpAsyncType ) =>
172
173
IsCoerceableFSharpType ( possibleFSharpAsyncType , FSharpAsyncGenericTypeName ) ;
173
174
175
+ [ RequiresUnreferencedCode ( "Reflecting over the async FSharpAsync<> contract." ) ]
174
176
private static bool IsFSharpUnit ( Type possibleFSharpUnitType ) =>
175
177
IsCoerceableFSharpType ( possibleFSharpUnitType , FSharpUnitTypeName ) ;
176
178
179
+ [ RequiresUnreferencedCode ( "Reflecting over the async FSharpAsync<> contract." ) ]
177
180
private static bool IsCoerceableFSharpType ( Type possibleFSharpType , string coerceableFSharpTypeName )
178
181
{
179
182
var typeFullName = possibleFSharpType ? . FullName ;
@@ -199,9 +202,7 @@ private static bool IsCoerceableFSharpType(Type possibleFSharpType, string coerc
199
202
}
200
203
}
201
204
202
- [ UnconditionalSuppressMessage ( "Trimmer" , "IL2026" , Justification = "Reflecting over the async FSharpAsync<> contract" ) ]
203
- [ UnconditionalSuppressMessage ( "Trimmer" , "IL2055" , Justification = "Reflecting over the async FSharpAsync<> contract" ) ]
204
- [ UnconditionalSuppressMessage ( "Trimmer" , "IL2072" , Justification = "Reflecting over the async FSharpAsync<> contract" ) ]
205
+ [ RequiresUnreferencedCode ( "Reflecting over the async FSharpAsync<> contract." ) ]
205
206
private static bool TryPopulateFSharpValueCaches ( Type possibleFSharpType )
206
207
{
207
208
var assembly = possibleFSharpType . Assembly ;
0 commit comments