Skip to content

Commit fb199d6

Browse files
committed
Baseline the trim warnings coming from the MVC.Core project.
1 parent 5a6a39a commit fb199d6

File tree

2 files changed

+23
-12
lines changed

2 files changed

+23
-12
lines changed

src/Mvc/Mvc.Core/src/ApplicationModels/DefaultApplicationModelProvider.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
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;
54
using System.Linq;
65
using System.Reflection;
76
using Microsoft.AspNetCore.Http;
@@ -356,12 +355,6 @@ internal PropertyModel CreatePropertyModel(PropertyInfo propertyInfo)
356355
return actionModel;
357356
}
358357

359-
[UnconditionalSuppressMessage("Trimming", "IL2026",
360-
Justification = "The method utilizes reflection to get information about the return type of an action")]
361-
[UnconditionalSuppressMessage("Trimming", "IL2060",
362-
Justification = "The method utilizes reflection to get information about the return type of an action")]
363-
[UnconditionalSuppressMessage("Trimming", "IL2072",
364-
Justification = "The method utilizes reflection to get information about the return type of an action")]
365358
internal static void AddReturnTypeMetadata(IList<SelectorModel> selectors, MethodInfo methodInfo)
366359
{
367360
// Get metadata from return type

src/Mvc/Mvc.Core/src/Microsoft.AspNetCore.Mvc.Core.WarningSuppressions.xml

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<linker>
3-
<assembly fullname="Microsoft.AspNetCore.Mvc.Core, Version=9.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60">
3+
<assembly fullname="Microsoft.AspNetCore.Mvc.Core, Version=10.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60">
44
<attribute fullname="System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessageAttribute">
55
<argument>ILLink</argument>
66
<argument>IL2026</argument>
@@ -17,7 +17,7 @@
1717
<argument>ILLink</argument>
1818
<argument>IL2026</argument>
1919
<property name="Scope">member</property>
20-
<property name="Target">M:Microsoft.AspNetCore.Builder.MvcApplicationBuilderExtensions.&lt;&gt;c.&lt;UseMvcWithDefaultRoute&gt;b__1_0(Microsoft.AspNetCore.Routing.IRouteBuilder)</property>
20+
<property name="Target">M:Microsoft.AspNetCore.Builder.MvcApplicationBuilderExtensions.&lt;&gt;c.{UseMvcWithDefaultRoute}b__1_0(Microsoft.AspNetCore.Routing.IRouteBuilder)</property>
2121
</attribute>
2222
<attribute fullname="System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessageAttribute">
2323
<argument>ILLink</argument>
@@ -37,6 +37,12 @@
3737
<property name="Scope">member</property>
3838
<property name="Target">M:Microsoft.AspNetCore.Mvc.AcceptedAtRouteResult.#ctor(System.String,System.Object,System.Object)</property>
3939
</attribute>
40+
<attribute fullname="System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessageAttribute">
41+
<argument>ILLink</argument>
42+
<argument>IL2026</argument>
43+
<property name="Scope">member</property>
44+
<property name="Target">M:Microsoft.AspNetCore.Mvc.ApplicationModels.DefaultApplicationModelProvider.AddReturnTypeMetadata(System.Collections.Generic.IList{Microsoft.AspNetCore.Mvc.ApplicationModels.SelectorModel},System.Reflection.MethodInfo)</property>
45+
</attribute>
4046
<attribute fullname="System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessageAttribute">
4147
<argument>ILLink</argument>
4248
<argument>IL2026</argument>
@@ -517,6 +523,12 @@
517523
<property name="Scope">member</property>
518524
<property name="Target">M:Microsoft.AspNetCore.Mvc.ApplicationParts.ProvideApplicationPartFactoryAttribute.GetFactoryType</property>
519525
</attribute>
526+
<attribute fullname="System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessageAttribute">
527+
<argument>ILLink</argument>
528+
<argument>IL2060</argument>
529+
<property name="Scope">member</property>
530+
<property name="Target">M:Microsoft.AspNetCore.Mvc.ApplicationModels.DefaultApplicationModelProvider.AddReturnTypeMetadata(System.Collections.Generic.IList{Microsoft.AspNetCore.Mvc.ApplicationModels.SelectorModel},System.Reflection.MethodInfo)</property>
531+
</attribute>
520532
<attribute fullname="System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessageAttribute">
521533
<argument>ILLink</argument>
522534
<argument>IL2060</argument>
@@ -533,7 +545,7 @@
533545
<argument>ILLink</argument>
534546
<argument>IL2060</argument>
535547
<property name="Scope">member</property>
536-
<property name="Target">M:Microsoft.AspNetCore.Mvc.ModelBinding.Validation.DefaultCollectionValidationStrategy.&lt;&gt;c.&lt;GetEnumeratorForElementType&gt;b__5_0(System.Type)</property>
548+
<property name="Target">M:Microsoft.AspNetCore.Mvc.ModelBinding.Validation.DefaultCollectionValidationStrategy.&lt;&gt;c.{GetEnumeratorForElementType}b__5_0(System.Type)</property>
537549
</attribute>
538550
<attribute fullname="System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessageAttribute">
539551
<argument>ILLink</argument>
@@ -557,7 +569,7 @@
557569
<argument>ILLink</argument>
558570
<argument>IL2067</argument>
559571
<property name="Scope">member</property>
560-
<property name="Target">M:Microsoft.AspNetCore.Mvc.Infrastructure.TypeActivatorCache.&lt;&gt;c.&lt;#ctor&gt;b__3_0(System.Type)</property>
572+
<property name="Target">M:Microsoft.AspNetCore.Mvc.Infrastructure.TypeActivatorCache.&lt;&gt;c.{#ctor}b__3_0(System.Type)</property>
561573
</attribute>
562574
<attribute fullname="System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessageAttribute">
563575
<argument>ILLink</argument>
@@ -629,14 +641,20 @@
629641
<argument>ILLink</argument>
630642
<argument>IL2070</argument>
631643
<property name="Scope">member</property>
632-
<property name="Target">M:Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.DefaultBindingMetadataProvider.&lt;GetRecordTypeConstructor&gt;g__IsRecordType|2_0(System.Type)</property>
644+
<property name="Target">M:Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.DefaultBindingMetadataProvider.{GetRecordTypeConstructor}g__IsRecordType|2_0(System.Type)</property>
633645
</attribute>
634646
<attribute fullname="System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessageAttribute">
635647
<argument>ILLink</argument>
636648
<argument>IL2070</argument>
637649
<property name="Scope">member</property>
638650
<property name="Target">M:Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.DefaultBindingMetadataProvider.GetBoundConstructor(System.Type)</property>
639651
</attribute>
652+
<attribute fullname="System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessageAttribute">
653+
<argument>ILLink</argument>
654+
<argument>IL2072</argument>
655+
<property name="Scope">member</property>
656+
<property name="Target">M:Microsoft.AspNetCore.Mvc.ApplicationModels.DefaultApplicationModelProvider.AddReturnTypeMetadata(System.Collections.Generic.IList{Microsoft.AspNetCore.Mvc.ApplicationModels.SelectorModel},System.Reflection.MethodInfo)</property>
657+
</attribute>
640658
<attribute fullname="System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessageAttribute">
641659
<argument>ILLink</argument>
642660
<argument>IL2072</argument>

0 commit comments

Comments
 (0)