Skip to content

Commit f2ad63d

Browse files
chore: Remove non validated trimming attributes
1 parent d976527 commit f2ad63d

2 files changed

Lines changed: 5 additions & 8 deletions

File tree

src/BlazorDesktop/Hosting/RootComponentMapping.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// The Blazor Desktop Contributors licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
44

5-
using System.Diagnostics.CodeAnalysis;
65
using Microsoft.AspNetCore.Components;
76

87
namespace BlazorDesktop.Hosting;
@@ -15,7 +14,6 @@ public readonly struct RootComponentMapping
1514
/// <summary>
1615
/// Gets the component type.
1716
/// </summary>
18-
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)]
1917
public Type ComponentType { get; }
2018

2119
/// <summary>
@@ -36,7 +34,7 @@ public readonly struct RootComponentMapping
3634
/// <param name="selector">The DOM element selector or component registration id for the component.</param>
3735
/// <exception cref="ArgumentNullException">Occurs when the <paramref name="componentType"/> or <paramref name="selector"/> parameters are null.</exception>
3836
/// <exception cref="ArgumentException">Occurs when <paramref name="componentType"/> does not inherit from <see cref="IComponent"/>.</exception>
39-
public RootComponentMapping([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type componentType, string selector)
37+
public RootComponentMapping(Type componentType, string selector)
4038
{
4139
if (componentType is null)
4240
{
@@ -65,7 +63,7 @@ public RootComponentMapping([DynamicallyAccessedMembers(DynamicallyAccessedMembe
6563
/// <param name="componentType">The component type. Must implement <see cref="IComponent"/>.</param>
6664
/// <param name="selector">The DOM element selector or component registration id for the component.</param>
6765
/// <param name="parameters">The parameters to pass to the component,</param>
68-
public RootComponentMapping([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type componentType, string selector, ParameterView parameters) : this(componentType, selector)
66+
public RootComponentMapping(Type componentType, string selector, ParameterView parameters) : this(componentType, selector)
6967
{
7068
Parameters = parameters;
7169
}

src/BlazorDesktop/Hosting/RootComponentMappingCollection.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// See the LICENSE file in the project root for more information.
44

55
using System.Collections.ObjectModel;
6-
using System.Diagnostics.CodeAnalysis;
76
using Microsoft.AspNetCore.Components;
87

98
namespace BlazorDesktop.Hosting;
@@ -19,7 +18,7 @@ public class RootComponentMappingCollection : Collection<RootComponentMapping>
1918
/// <typeparam name="TComponent">The component type.</typeparam>
2019
/// <param name="selector">The DOM element selector.</param>
2120
/// <exception cref="ArgumentNullException">Occurs when <paramref name="selector"/> is null.</exception>
22-
public void Add<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] TComponent>(string selector) where TComponent : IComponent
21+
public void Add<TComponent>(string selector) where TComponent : IComponent
2322
{
2423
if (selector is null)
2524
{
@@ -34,7 +33,7 @@ public class RootComponentMappingCollection : Collection<RootComponentMapping>
3433
/// </summary>
3534
/// <param name="componentType">The component type. Must implement <see cref="IComponent"/>.</param>
3635
/// <param name="selector">The DOM element selector.</param>
37-
public void Add([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type componentType, string selector)
36+
public void Add(Type componentType, string selector)
3837
{
3938
Add(componentType, selector, ParameterView.Empty);
4039
}
@@ -46,7 +45,7 @@ public void Add([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)]
4645
/// <param name="selector">The DOM element selector.</param>
4746
/// <param name="parameters">The parameters to the root component.</param>
4847
/// <exception cref="ArgumentNullException">Occurs when <paramref name="componentType"/> or <paramref name="selector"/> is null.</exception>
49-
public void Add([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type componentType, string selector, ParameterView parameters)
48+
public void Add(Type componentType, string selector, ParameterView parameters)
5049
{
5150
if (componentType is null)
5251
{

0 commit comments

Comments
 (0)