Sync shared code from aspnetcore (#67456)
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Fri, 1 Apr 2022 22:26:17 +0000 (15:26 -0700)
committerGitHub <noreply@github.com>
Fri, 1 Apr 2022 22:26:17 +0000 (15:26 -0700)
src/libraries/Common/src/System/Net/Http/aspnetcore/NetEventSource.Common.cs

index 8a94400..ff93dca 100644 (file)
@@ -10,6 +10,7 @@
 #nullable enable
 using System.Collections;
 using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
 using System.Diagnostics.Tracing;
 using System.Globalization;
 using System.Runtime.CompilerServices;
@@ -440,6 +441,7 @@ namespace System.Net
         #region Custom WriteEvent overloads
 
         [NonEvent]
+        [UnconditionalSuppressMessage("Trimming", "IL2026", Justification = "Parameters passed to WriteEvent are all primative values.")]
         private unsafe void WriteEvent(int eventId, string? arg1, string? arg2, string? arg3, string? arg4)
         {
             if (IsEnabled())
@@ -484,6 +486,7 @@ namespace System.Net
         }
 
         [NonEvent]
+        [UnconditionalSuppressMessage("Trimming", "IL2026", Justification = "Parameters passed to WriteEvent are all primative values.")]
         private unsafe void WriteEvent(int eventId, string? arg1, string? arg2, byte[]? arg3)
         {
             if (IsEnabled())