Skip to content
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
288 changes: 144 additions & 144 deletions eng/Version.Details.xml

Large diffs are not rendered by default.

144 changes: 72 additions & 72 deletions eng/Versions.props

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions eng/testing/linker/ILLink.Descriptors.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<linker>
<assembly fullname="System.Private.CoreLib">
<type fullname="System.Array" />
</assembly>
</linker>
7 changes: 7 additions & 0 deletions eng/testing/linker/project.csproj.template
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,11 @@
{AdditionalProjectReferences}
</ItemGroup>

<!-- Workaround for trimming tests failing during execution. -->
<ItemGroup>
<EmbeddedResource Include="ILLink.Descriptors.xml">
<LogicalName>ILLink.Descriptors.xml</LogicalName>
</EmbeddedResource>
</ItemGroup>

</Project>
2 changes: 2 additions & 0 deletions eng/testing/linker/trimmingTests.targets
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@
<Copy SourceFiles="$(_projectSourceFile);
@(_additionalProjectSourceFiles)"
DestinationFolder="$(_projectDir)" />
<Copy SourceFiles="$(MSBuildThisFileDirectory)ILLink.Descriptors.xml"
DestinationFolder="$(_projectDir)" />
<Message Text="Generated $(_projectFile)" />
</Target>

Expand Down
4 changes: 2 additions & 2 deletions src/Components/Forms/src/FieldIdentifier.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ private static void ParseAccessor<T>(Expression<Func<T>> accessor, out object mo
// so, given that it embeds captured values such as "this". We could consider special-casing
// for "() => something.Member" and building a cache keyed by "something.GetType()" with values
// of type Func<object, object> so we can cheaply map from "something" to "something.Member".
var modelLambda = Expression.Lambda(memberExpression.Expression);
var modelLambda = Expression.Lambda(typeof(Func<object?>), memberExpression.Expression);
var modelLambdaCompiled = (Func<object?>)modelLambda.Compile();
var result = modelLambdaCompiled() ??
throw new ArgumentException("The provided expression must evaluate to a non-null value.");
Expand Down Expand Up @@ -201,7 +201,7 @@ static Func<object, object> CreateAccessor((Type model, MemberInfo member) arg)
private static object GetModelFromIndexer(Expression methodCallExpression)
{
object model;
var methodCallObjectLambda = Expression.Lambda(methodCallExpression!);
var methodCallObjectLambda = Expression.Lambda(typeof(Func<object?>), methodCallExpression!);
var methodCallObjectLambdaCompiled = (Func<object?>)methodCallObjectLambda.Compile();
var result = methodCallObjectLambdaCompiled();
if (result is null)
Expand Down
2 changes: 2 additions & 0 deletions src/SignalR/server/Core/src/DynamicHub.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System.Diagnostics.CodeAnalysis;
namespace Microsoft.AspNetCore.SignalR;

/// <summary>
/// A base class for SignalR hubs that use <c>dynamic</c> to represent client invocations.
/// </summary>
[RequiresDynamicCode("DynamicHub requires dynamic code generation to construct a call site.")]
public abstract class DynamicHub : Hub
{
private DynamicHubClients? _clients;
Expand Down
2 changes: 2 additions & 0 deletions src/SignalR/server/Core/src/DynamicHubClients.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System.Diagnostics.CodeAnalysis;
using Microsoft.AspNetCore.SignalR.Internal;

namespace Microsoft.AspNetCore.SignalR;

/// <summary>
/// A class that provides <c>dynamic</c> access to connections, including the one that sent the current invocation.
/// </summary>
[RequiresDynamicCodeAttribute("DynamicHubClients requires dynamic code generation to construct a call site.")]
public class DynamicHubClients
{
private readonly IHubCallerClients _clients;
Expand Down
2 changes: 2 additions & 0 deletions src/SignalR/server/Core/src/Internal/DynamicClientProxy.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System.Diagnostics.CodeAnalysis;
using System.Dynamic;

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

[RequiresDynamicCodeAttribute("This constructor requires dynamic code generation to construct a call site.")]
public DynamicClientProxy(IClientProxy clientProxy)
{
_clientProxy = clientProxy;
Expand Down
Loading