Skip to content

Commit d7df477

Browse files
Fix trim warning in ResilienceHandlerContext (#4626)
Contributes to #4622 Co-authored-by: Eric Erhardt <[email protected]>
1 parent bb2bdb8 commit d7df477

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Libraries/Microsoft.Extensions.Http.Resilience/Resilience/ResilienceHandlerContext.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33

44
using System;
5+
using System.Diagnostics.CodeAnalysis;
56
using Microsoft.Extensions.Http.Resilience.Internal;
67
using Microsoft.Shared.Diagnostics;
78
using Polly.DependencyInjection;
@@ -47,7 +48,7 @@ internal ResilienceHandlerContext(AddResiliencePipelineContext<HttpKey> context)
4748
/// 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.
4849
/// </para>
4950
/// </remarks>
50-
public void EnableReloads<TOptions>(string? name = null) => _context.EnableReloads<TOptions>(name);
51+
public void EnableReloads<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] TOptions>(string? name = null) => _context.EnableReloads<TOptions>(name);
5152

5253
/// <summary>
5354
/// Gets the options identified by <paramref name="name"/>.

0 commit comments

Comments
 (0)