Skip to content

Commit

Permalink
Fix trim warning in ResilienceHandlerContext
Browse files Browse the repository at this point in the history
Contributes to #4622
  • Loading branch information
eerhardt authored and github-actions committed Oct 27, 2023
1 parent 83b9004 commit 7d05e36
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.

using System;
using System.Diagnostics.CodeAnalysis;
using Microsoft.Extensions.Http.Resilience.Internal;
using Microsoft.Shared.Diagnostics;
using Polly.DependencyInjection;
Expand Down Expand Up @@ -47,7 +48,7 @@ internal ResilienceHandlerContext(AddResiliencePipelineContext<HttpKey> context)
/// You can listen for changes only for single options. If you call this method multiple times, the preceding calls are ignored and only the last one wins.
/// </para>
/// </remarks>
public void EnableReloads<TOptions>(string? name = null) => _context.EnableReloads<TOptions>(name);
public void EnableReloads<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] TOptions>(string? name = null) => _context.EnableReloads<TOptions>(name);

/// <summary>
/// Gets the options identified by <paramref name="name"/>.
Expand Down

0 comments on commit 7d05e36

Please sign in to comment.