Skip to content

Commit 218f0fe

Browse files
committed
Temporarily supress a bunch of warnings
1 parent 6db97d3 commit 218f0fe

File tree

4 files changed

+13
-0
lines changed

4 files changed

+13
-0
lines changed

src/Components/Authorization/src/AuthorizeRouteView.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

4+
using System.Diagnostics.CodeAnalysis;
45
using System.Threading.Tasks;
56
using Microsoft.AspNetCore.Authorization;
67
using Microsoft.AspNetCore.Components.Rendering;
@@ -95,6 +96,10 @@ private void RenderAuthorizeRouteViewCore(RenderTreeBuilder builder)
9596
builder.CloseComponent();
9697
}
9798

99+
[UnconditionalSuppressMessage("ReflectionAnalysis", "IL2111:RequiresUnreferencedCode",
100+
Justification = "OpenComponent already has the right set of attributes")]
101+
[UnconditionalSuppressMessage("ReflectionAnalysis", "IL2110:RequiresUnreferencedCode",
102+
Justification = "OpenComponent already has the right set of attributes")]
98103
private void RenderContentInDefaultLayout(RenderTreeBuilder builder, RenderFragment content)
99104
{
100105
builder.OpenComponent<LayoutView>(0);

src/Components/Web/src/JSComponents/JSComponentInterop.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
using System.Collections.Concurrent;
55
using System.ComponentModel;
6+
using System.Diagnostics.CodeAnalysis;
67
using System.Reflection;
78
using System.Reflection.Metadata;
89
using System.Text.Json;
@@ -76,6 +77,8 @@ protected internal virtual int AddRootComponent(string identifier, string domEle
7677
/// <summary>
7778
/// For framework use only.
7879
/// </summary>
80+
[UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026:RequiresUnreferencedCode",
81+
Justification = "OpenComponent already has the right set of attributes")]
7982
protected internal void SetRootComponentParameters(int componentId, int parameterCount, JsonElement parametersJson, JsonSerializerOptions jsonOptions)
8083
{
8184
// In case the client misreports the number of parameters, impose bounds so we know the amount

src/Components/Web/src/WebEventData/WebEventData.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ private WebEventData(ulong eventHandlerId, EventFieldInfo? eventFieldInfo, Event
5959

6060
public EventArgs EventArgs { get; }
6161

62+
[UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026:RequiresUnreferencedCode",
63+
Justification = "We are already using the appropriate overload")]
6264
private static EventArgs ParseEventArgsJson(
6365
Renderer renderer,
6466
JsonSerializerOptions jsonSerializerOptions,

src/Components/WebAssembly/WebAssembly/src/HotReload/HotReloadAgent.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
using System;
77
using System.Collections.Concurrent;
88
using System.Collections.Generic;
9+
using System.Diagnostics.CodeAnalysis;
910
using System.Linq;
1011
using System.Reflection;
1112
using System.Reflection.Metadata;
@@ -217,6 +218,8 @@ public void ApplyDeltas(IReadOnlyList<UpdateDelta> deltas)
217218
}
218219
}
219220

221+
[UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026:RequiresUnreferencedCode",
222+
Justification = "OpenComponent already has the right set of attributes")]
220223
private Type[] GetMetadataUpdateTypes(IReadOnlyList<UpdateDelta> deltas)
221224
{
222225
List<Type>? types = null;

0 commit comments

Comments
 (0)