Skip to content

Commit df97648

Browse files
committed
Revert linker workarounds
1 parent 3d7a255 commit df97648

File tree

5 files changed

+2
-15
lines changed

5 files changed

+2
-15
lines changed

eng/testing/linker/project.csproj.template

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,4 @@
2727
{AdditionalProjectReferences}
2828
</ItemGroup>
2929

30-
<!-- Workaround for trimming tests failing during execution. -->
31-
<ItemGroup>
32-
<EmbeddedResource Include="ILLink.Descriptors.xml">
33-
<LogicalName>ILLink.Descriptors.xml</LogicalName>
34-
</EmbeddedResource>
35-
</ItemGroup>
36-
3730
</Project>

src/Components/Forms/src/FieldIdentifier.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ private static void ParseAccessor<T>(Expression<Func<T>> accessor, out object mo
126126
// so, given that it embeds captured values such as "this". We could consider special-casing
127127
// for "() => something.Member" and building a cache keyed by "something.GetType()" with values
128128
// of type Func<object, object> so we can cheaply map from "something" to "something.Member".
129-
var modelLambda = Expression.Lambda(typeof(Func<object?>), memberExpression.Expression);
129+
var modelLambda = Expression.Lambda(memberExpression.Expression);
130130
var modelLambdaCompiled = (Func<object?>)modelLambda.Compile();
131131
var result = modelLambdaCompiled() ??
132132
throw new ArgumentException("The provided expression must evaluate to a non-null value.");
@@ -201,7 +201,7 @@ static Func<object, object> CreateAccessor((Type model, MemberInfo member) arg)
201201
private static object GetModelFromIndexer(Expression methodCallExpression)
202202
{
203203
object model;
204-
var methodCallObjectLambda = Expression.Lambda(typeof(Func<object?>), methodCallExpression!);
204+
var methodCallObjectLambda = Expression.Lambda(methodCallExpression!);
205205
var methodCallObjectLambdaCompiled = (Func<object?>)methodCallObjectLambda.Compile();
206206
var result = methodCallObjectLambdaCompiled();
207207
if (result is null)

src/SignalR/server/Core/src/DynamicHub.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
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
namespace Microsoft.AspNetCore.SignalR;
65

76
/// <summary>
87
/// A base class for SignalR hubs that use <c>dynamic</c> to represent client invocations.
98
/// </summary>
10-
[RequiresDynamicCode("DynamicHub requires dynamic code generation to construct a call site.")]
119
public abstract class DynamicHub : Hub
1210
{
1311
private DynamicHubClients? _clients;

src/SignalR/server/Core/src/DynamicHubClients.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
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 Microsoft.AspNetCore.SignalR.Internal;
65

76
namespace Microsoft.AspNetCore.SignalR;
87

98
/// <summary>
109
/// A class that provides <c>dynamic</c> access to connections, including the one that sent the current invocation.
1110
/// </summary>
12-
[RequiresDynamicCodeAttribute("DynamicHubClients requires dynamic code generation to construct a call site.")]
1311
public class DynamicHubClients
1412
{
1513
private readonly IHubCallerClients _clients;

src/SignalR/server/Core/src/Internal/DynamicClientProxy.cs

Lines changed: 0 additions & 2 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.Dynamic;
65

76
namespace Microsoft.AspNetCore.SignalR.Internal;
@@ -10,7 +9,6 @@ internal sealed class DynamicClientProxy : DynamicObject
109
{
1110
private readonly IClientProxy _clientProxy;
1211

13-
[RequiresDynamicCodeAttribute("This constructor requires dynamic code generation to construct a call site.")]
1412
public DynamicClientProxy(IClientProxy clientProxy)
1513
{
1614
_clientProxy = clientProxy;

0 commit comments

Comments
 (0)