Skip to content

Commit 9a63e4e

Browse files
Update trimming justifications
Some minor updates to the trimming annotations added in #1414.
1 parent dd14ca6 commit 9a63e4e

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/Polly.Core/Telemetry/ResilienceStrategyTelemetry.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ internal ResilienceStrategyTelemetry(ResilienceTelemetrySource source, Diagnosti
3636
[UnconditionalSuppressMessage(
3737
"Trimming",
3838
"IL2026:Members annotated with 'RequiresUnreferencedCodeAttribute' require dynamic access otherwise can break functionality when trimming application code",
39-
Justification = "The reflection is not used when consuming the event.")]
39+
Justification = "Reflection is not used when consuming the event.")]
4040
[UnconditionalSuppressMessage(
4141
"AOT",
4242
"IL3050:Calling members annotated with 'RequiresDynamicCodeAttribute' may break functionality when AOT compiling.",
43-
Justification = "The reflection is not used when consuming the event.")]
43+
Justification = "Reflection is not used when consuming the event.")]
4444
public void Report<TArgs>(ResilienceEvent resilienceEvent, ResilienceContext context, TArgs args)
4545
{
4646
Guard.NotNull(context);
@@ -69,11 +69,11 @@ public void Report<TArgs>(ResilienceEvent resilienceEvent, ResilienceContext con
6969
[UnconditionalSuppressMessage(
7070
"Trimming",
7171
"IL2026:Members annotated with 'RequiresUnreferencedCodeAttribute' require dynamic access otherwise can break functionality when trimming application code",
72-
Justification = "The reflection is not used when consuming the event.")]
72+
Justification = "Reflection is not used when consuming the event.")]
7373
[UnconditionalSuppressMessage(
7474
"AOT",
7575
"IL3050:Calling members annotated with 'RequiresDynamicCodeAttribute' may break functionality when AOT compiling.",
76-
Justification = "The reflection is not used when consuming the event.")]
76+
Justification = "Reflection is not used when consuming the event.")]
7777
public void Report<TArgs, TResult>(ResilienceEvent resilienceEvent, OutcomeArguments<TResult, TArgs> args)
7878
{
7979
args.Context.AddResilienceEvent(resilienceEvent);

src/Polly.Core/Utils/Constants.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ internal static class Constants
44
{
55
public const string OptionsValidation = """
66
This call validates the options using the data annotations attributes.
7-
Make sure that the options are included using the '[DynamicDependency(DynamicallyAccessedMemberTypes.All, typeof(OptionsType))]' attribute on top of calling method.
7+
Make sure that the options are included by adding the '[DynamicDependency(DynamicallyAccessedMemberTypes.All, typeof(OptionsType))]' attribute to the calling method.
88
""";
99
}

src/Polly.Core/Utils/ValidationHelper.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ internal static class ValidationHelper
1111
[UnconditionalSuppressMessage(
1212
"Trimming",
1313
"IL2026:Members annotated with 'RequiresUnreferencedCodeAttribute' require dynamic access otherwise can break functionality when trimming application code",
14-
Justification = "The member of options are preserved and no trimmed. See builder.AddStrategy() extension.")]
14+
Justification = "The member of options are preserved and not trimmed. See builder.AddStrategy() extension.")]
1515
public static void ValidateObject(ResilienceValidationContext context)
1616
{
1717
Guard.NotNull(context);

0 commit comments

Comments
 (0)