Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix trim warning in ResilienceHandlerContext #4624

Merged
merged 1 commit into from
Oct 27, 2023
Merged
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
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