Skip to content

[release/8.0-preview4] Add suppression message to JSON serialization #47910

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,9 @@ private static EndpointFilterDelegate BuildFilterDelegate(EndpointFilterDelegate
return filteredInvocation;
}

[UnconditionalSuppressMessage("Trimming", "IL2026:RequiresUnreferencedCode",
Justification = "The 'JsonSerializer.IsReflectionEnabledByDefault' feature switch, which is set to false by default for trimmed ASP.NET apps, ensures the JsonSerializer doesn't use Reflection.")]
[UnconditionalSuppressMessage("AOT", "IL3050:RequiresDynamicCode", Justification = "See above.")]
private static Task ExecuteObjectResult(object? obj, HttpContext httpContext)
{
if (obj is IResult r)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1704,6 +1704,9 @@ namespace Microsoft.AspNetCore.Http.Generated
return filteredInvocation;
}

[UnconditionalSuppressMessage("Trimming", "IL2026:RequiresUnreferencedCode",
Justification = "The 'JsonSerializer.IsReflectionEnabledByDefault' feature switch, which is set to false by default for trimmed ASP.NET apps, ensures the JsonSerializer doesn't use Reflection.")]
[UnconditionalSuppressMessage("AOT", "IL3050:RequiresDynamicCode", Justification = "See above.")]
private static Task ExecuteObjectResult(object? obj, HttpContext httpContext)
{
if (obj is IResult r)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,9 @@ namespace Microsoft.AspNetCore.Http.Generated
return filteredInvocation;
}

[UnconditionalSuppressMessage("Trimming", "IL2026:RequiresUnreferencedCode",
Justification = "The 'JsonSerializer.IsReflectionEnabledByDefault' feature switch, which is set to false by default for trimmed ASP.NET apps, ensures the JsonSerializer doesn't use Reflection.")]
[UnconditionalSuppressMessage("AOT", "IL3050:RequiresDynamicCode", Justification = "See above.")]
private static Task ExecuteObjectResult(object? obj, HttpContext httpContext)
{
if (obj is IResult r)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,9 @@ namespace Microsoft.AspNetCore.Http.Generated
return filteredInvocation;
}

[UnconditionalSuppressMessage("Trimming", "IL2026:RequiresUnreferencedCode",
Justification = "The 'JsonSerializer.IsReflectionEnabledByDefault' feature switch, which is set to false by default for trimmed ASP.NET apps, ensures the JsonSerializer doesn't use Reflection.")]
[UnconditionalSuppressMessage("AOT", "IL3050:RequiresDynamicCode", Justification = "See above.")]
private static Task ExecuteObjectResult(object? obj, HttpContext httpContext)
{
if (obj is IResult r)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,9 @@ namespace Microsoft.AspNetCore.Http.Generated
return filteredInvocation;
}

[UnconditionalSuppressMessage("Trimming", "IL2026:RequiresUnreferencedCode",
Justification = "The 'JsonSerializer.IsReflectionEnabledByDefault' feature switch, which is set to false by default for trimmed ASP.NET apps, ensures the JsonSerializer doesn't use Reflection.")]
[UnconditionalSuppressMessage("AOT", "IL3050:RequiresDynamicCode", Justification = "See above.")]
private static Task ExecuteObjectResult(object? obj, HttpContext httpContext)
{
if (obj is IResult r)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,9 @@ namespace Microsoft.AspNetCore.Http.Generated
return filteredInvocation;
}

[UnconditionalSuppressMessage("Trimming", "IL2026:RequiresUnreferencedCode",
Justification = "The 'JsonSerializer.IsReflectionEnabledByDefault' feature switch, which is set to false by default for trimmed ASP.NET apps, ensures the JsonSerializer doesn't use Reflection.")]
[UnconditionalSuppressMessage("AOT", "IL3050:RequiresDynamicCode", Justification = "See above.")]
private static Task ExecuteObjectResult(object? obj, HttpContext httpContext)
{
if (obj is IResult r)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,9 @@ namespace Microsoft.AspNetCore.Http.Generated
return filteredInvocation;
}

[UnconditionalSuppressMessage("Trimming", "IL2026:RequiresUnreferencedCode",
Justification = "The 'JsonSerializer.IsReflectionEnabledByDefault' feature switch, which is set to false by default for trimmed ASP.NET apps, ensures the JsonSerializer doesn't use Reflection.")]
[UnconditionalSuppressMessage("AOT", "IL3050:RequiresDynamicCode", Justification = "See above.")]
private static Task ExecuteObjectResult(object? obj, HttpContext httpContext)
{
if (obj is IResult r)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,9 @@ namespace Microsoft.AspNetCore.Http.Generated
return filteredInvocation;
}

[UnconditionalSuppressMessage("Trimming", "IL2026:RequiresUnreferencedCode",
Justification = "The 'JsonSerializer.IsReflectionEnabledByDefault' feature switch, which is set to false by default for trimmed ASP.NET apps, ensures the JsonSerializer doesn't use Reflection.")]
[UnconditionalSuppressMessage("AOT", "IL3050:RequiresDynamicCode", Justification = "See above.")]
private static Task ExecuteObjectResult(object? obj, HttpContext httpContext)
{
if (obj is IResult r)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,9 @@ namespace Microsoft.AspNetCore.Http.Generated
return filteredInvocation;
}

[UnconditionalSuppressMessage("Trimming", "IL2026:RequiresUnreferencedCode",
Justification = "The 'JsonSerializer.IsReflectionEnabledByDefault' feature switch, which is set to false by default for trimmed ASP.NET apps, ensures the JsonSerializer doesn't use Reflection.")]
[UnconditionalSuppressMessage("AOT", "IL3050:RequiresDynamicCode", Justification = "See above.")]
private static Task ExecuteObjectResult(object? obj, HttpContext httpContext)
{
if (obj is IResult r)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,9 @@ namespace Microsoft.AspNetCore.Http.Generated
return filteredInvocation;
}

[UnconditionalSuppressMessage("Trimming", "IL2026:RequiresUnreferencedCode",
Justification = "The 'JsonSerializer.IsReflectionEnabledByDefault' feature switch, which is set to false by default for trimmed ASP.NET apps, ensures the JsonSerializer doesn't use Reflection.")]
[UnconditionalSuppressMessage("AOT", "IL3050:RequiresDynamicCode", Justification = "See above.")]
private static Task ExecuteObjectResult(object? obj, HttpContext httpContext)
{
if (obj is IResult r)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,9 @@ namespace Microsoft.AspNetCore.Http.Generated
return filteredInvocation;
}

[UnconditionalSuppressMessage("Trimming", "IL2026:RequiresUnreferencedCode",
Justification = "The 'JsonSerializer.IsReflectionEnabledByDefault' feature switch, which is set to false by default for trimmed ASP.NET apps, ensures the JsonSerializer doesn't use Reflection.")]
[UnconditionalSuppressMessage("AOT", "IL3050:RequiresDynamicCode", Justification = "See above.")]
private static Task ExecuteObjectResult(object? obj, HttpContext httpContext)
{
if (obj is IResult r)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,9 @@ namespace Microsoft.AspNetCore.Http.Generated
return filteredInvocation;
}

[UnconditionalSuppressMessage("Trimming", "IL2026:RequiresUnreferencedCode",
Justification = "The 'JsonSerializer.IsReflectionEnabledByDefault' feature switch, which is set to false by default for trimmed ASP.NET apps, ensures the JsonSerializer doesn't use Reflection.")]
[UnconditionalSuppressMessage("AOT", "IL3050:RequiresDynamicCode", Justification = "See above.")]
private static Task ExecuteObjectResult(object? obj, HttpContext httpContext)
{
if (obj is IResult r)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,9 @@ namespace Microsoft.AspNetCore.Http.Generated
return filteredInvocation;
}

[UnconditionalSuppressMessage("Trimming", "IL2026:RequiresUnreferencedCode",
Justification = "The 'JsonSerializer.IsReflectionEnabledByDefault' feature switch, which is set to false by default for trimmed ASP.NET apps, ensures the JsonSerializer doesn't use Reflection.")]
[UnconditionalSuppressMessage("AOT", "IL3050:RequiresDynamicCode", Justification = "See above.")]
private static Task ExecuteObjectResult(object? obj, HttpContext httpContext)
{
if (obj is IResult r)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,9 @@ namespace Microsoft.AspNetCore.Http.Generated
return filteredInvocation;
}

[UnconditionalSuppressMessage("Trimming", "IL2026:RequiresUnreferencedCode",
Justification = "The 'JsonSerializer.IsReflectionEnabledByDefault' feature switch, which is set to false by default for trimmed ASP.NET apps, ensures the JsonSerializer doesn't use Reflection.")]
[UnconditionalSuppressMessage("AOT", "IL3050:RequiresDynamicCode", Justification = "See above.")]
private static Task ExecuteObjectResult(object? obj, HttpContext httpContext)
{
if (obj is IResult r)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,9 @@ namespace Microsoft.AspNetCore.Http.Generated
return filteredInvocation;
}

[UnconditionalSuppressMessage("Trimming", "IL2026:RequiresUnreferencedCode",
Justification = "The 'JsonSerializer.IsReflectionEnabledByDefault' feature switch, which is set to false by default for trimmed ASP.NET apps, ensures the JsonSerializer doesn't use Reflection.")]
[UnconditionalSuppressMessage("AOT", "IL3050:RequiresDynamicCode", Justification = "See above.")]
private static Task ExecuteObjectResult(object? obj, HttpContext httpContext)
{
if (obj is IResult r)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,9 @@ namespace Microsoft.AspNetCore.Http.Generated
return filteredInvocation;
}

[UnconditionalSuppressMessage("Trimming", "IL2026:RequiresUnreferencedCode",
Justification = "The 'JsonSerializer.IsReflectionEnabledByDefault' feature switch, which is set to false by default for trimmed ASP.NET apps, ensures the JsonSerializer doesn't use Reflection.")]
[UnconditionalSuppressMessage("AOT", "IL3050:RequiresDynamicCode", Justification = "See above.")]
private static Task ExecuteObjectResult(object? obj, HttpContext httpContext)
{
if (obj is IResult r)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,9 @@ namespace Microsoft.AspNetCore.Http.Generated
return filteredInvocation;
}

[UnconditionalSuppressMessage("Trimming", "IL2026:RequiresUnreferencedCode",
Justification = "The 'JsonSerializer.IsReflectionEnabledByDefault' feature switch, which is set to false by default for trimmed ASP.NET apps, ensures the JsonSerializer doesn't use Reflection.")]
[UnconditionalSuppressMessage("AOT", "IL3050:RequiresDynamicCode", Justification = "See above.")]
private static Task ExecuteObjectResult(object? obj, HttpContext httpContext)
{
if (obj is IResult r)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,9 @@ namespace Microsoft.AspNetCore.Http.Generated
return filteredInvocation;
}

[UnconditionalSuppressMessage("Trimming", "IL2026:RequiresUnreferencedCode",
Justification = "The 'JsonSerializer.IsReflectionEnabledByDefault' feature switch, which is set to false by default for trimmed ASP.NET apps, ensures the JsonSerializer doesn't use Reflection.")]
[UnconditionalSuppressMessage("AOT", "IL3050:RequiresDynamicCode", Justification = "See above.")]
private static Task ExecuteObjectResult(object? obj, HttpContext httpContext)
{
if (obj is IResult r)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,9 @@ namespace Microsoft.AspNetCore.Http.Generated
return filteredInvocation;
}

[UnconditionalSuppressMessage("Trimming", "IL2026:RequiresUnreferencedCode",
Justification = "The 'JsonSerializer.IsReflectionEnabledByDefault' feature switch, which is set to false by default for trimmed ASP.NET apps, ensures the JsonSerializer doesn't use Reflection.")]
[UnconditionalSuppressMessage("AOT", "IL3050:RequiresDynamicCode", Justification = "See above.")]
private static Task ExecuteObjectResult(object? obj, HttpContext httpContext)
{
if (obj is IResult r)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,9 @@ namespace Microsoft.AspNetCore.Http.Generated
return filteredInvocation;
}

[UnconditionalSuppressMessage("Trimming", "IL2026:RequiresUnreferencedCode",
Justification = "The 'JsonSerializer.IsReflectionEnabledByDefault' feature switch, which is set to false by default for trimmed ASP.NET apps, ensures the JsonSerializer doesn't use Reflection.")]
[UnconditionalSuppressMessage("AOT", "IL3050:RequiresDynamicCode", Justification = "See above.")]
private static Task ExecuteObjectResult(object? obj, HttpContext httpContext)
{
if (obj is IResult r)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,9 @@ namespace Microsoft.AspNetCore.Http.Generated
return filteredInvocation;
}

[UnconditionalSuppressMessage("Trimming", "IL2026:RequiresUnreferencedCode",
Justification = "The 'JsonSerializer.IsReflectionEnabledByDefault' feature switch, which is set to false by default for trimmed ASP.NET apps, ensures the JsonSerializer doesn't use Reflection.")]
[UnconditionalSuppressMessage("AOT", "IL3050:RequiresDynamicCode", Justification = "See above.")]
private static Task ExecuteObjectResult(object? obj, HttpContext httpContext)
{
if (obj is IResult r)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,9 @@ namespace Microsoft.AspNetCore.Http.Generated
return filteredInvocation;
}

[UnconditionalSuppressMessage("Trimming", "IL2026:RequiresUnreferencedCode",
Justification = "The 'JsonSerializer.IsReflectionEnabledByDefault' feature switch, which is set to false by default for trimmed ASP.NET apps, ensures the JsonSerializer doesn't use Reflection.")]
[UnconditionalSuppressMessage("AOT", "IL3050:RequiresDynamicCode", Justification = "See above.")]
private static Task ExecuteObjectResult(object? obj, HttpContext httpContext)
{
if (obj is IResult r)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,9 @@ namespace Microsoft.AspNetCore.Http.Generated
return filteredInvocation;
}

[UnconditionalSuppressMessage("Trimming", "IL2026:RequiresUnreferencedCode",
Justification = "The 'JsonSerializer.IsReflectionEnabledByDefault' feature switch, which is set to false by default for trimmed ASP.NET apps, ensures the JsonSerializer doesn't use Reflection.")]
[UnconditionalSuppressMessage("AOT", "IL3050:RequiresDynamicCode", Justification = "See above.")]
private static Task ExecuteObjectResult(object? obj, HttpContext httpContext)
{
if (obj is IResult r)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,9 @@ namespace Microsoft.AspNetCore.Http.Generated
return filteredInvocation;
}

[UnconditionalSuppressMessage("Trimming", "IL2026:RequiresUnreferencedCode",
Justification = "The 'JsonSerializer.IsReflectionEnabledByDefault' feature switch, which is set to false by default for trimmed ASP.NET apps, ensures the JsonSerializer doesn't use Reflection.")]
[UnconditionalSuppressMessage("AOT", "IL3050:RequiresDynamicCode", Justification = "See above.")]
private static Task ExecuteObjectResult(object? obj, HttpContext httpContext)
{
if (obj is IResult r)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,9 @@ namespace Microsoft.AspNetCore.Http.Generated
return filteredInvocation;
}

[UnconditionalSuppressMessage("Trimming", "IL2026:RequiresUnreferencedCode",
Justification = "The 'JsonSerializer.IsReflectionEnabledByDefault' feature switch, which is set to false by default for trimmed ASP.NET apps, ensures the JsonSerializer doesn't use Reflection.")]
[UnconditionalSuppressMessage("AOT", "IL3050:RequiresDynamicCode", Justification = "See above.")]
private static Task ExecuteObjectResult(object? obj, HttpContext httpContext)
{
if (obj is IResult r)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,9 @@ namespace Microsoft.AspNetCore.Http.Generated
return filteredInvocation;
}

[UnconditionalSuppressMessage("Trimming", "IL2026:RequiresUnreferencedCode",
Justification = "The 'JsonSerializer.IsReflectionEnabledByDefault' feature switch, which is set to false by default for trimmed ASP.NET apps, ensures the JsonSerializer doesn't use Reflection.")]
[UnconditionalSuppressMessage("AOT", "IL3050:RequiresDynamicCode", Justification = "See above.")]
private static Task ExecuteObjectResult(object? obj, HttpContext httpContext)
{
if (obj is IResult r)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,9 @@ namespace Microsoft.AspNetCore.Http.Generated
return filteredInvocation;
}

[UnconditionalSuppressMessage("Trimming", "IL2026:RequiresUnreferencedCode",
Justification = "The 'JsonSerializer.IsReflectionEnabledByDefault' feature switch, which is set to false by default for trimmed ASP.NET apps, ensures the JsonSerializer doesn't use Reflection.")]
[UnconditionalSuppressMessage("AOT", "IL3050:RequiresDynamicCode", Justification = "See above.")]
private static Task ExecuteObjectResult(object? obj, HttpContext httpContext)
{
if (obj is IResult r)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,9 @@ namespace Microsoft.AspNetCore.Http.Generated
return filteredInvocation;
}

[UnconditionalSuppressMessage("Trimming", "IL2026:RequiresUnreferencedCode",
Justification = "The 'JsonSerializer.IsReflectionEnabledByDefault' feature switch, which is set to false by default for trimmed ASP.NET apps, ensures the JsonSerializer doesn't use Reflection.")]
[UnconditionalSuppressMessage("AOT", "IL3050:RequiresDynamicCode", Justification = "See above.")]
private static Task ExecuteObjectResult(object? obj, HttpContext httpContext)
{
if (obj is IResult r)
Expand Down