<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="10.0.0-preview.5.25277.114" />

SR

static class SR
using FxResources.System.Diagnostics.DiagnosticSource; using System.Resources; namespace System { internal static class SR { private static readonly bool s_usingResourceKeys = GetUsingResourceKeysSwitchValue(); private static ResourceManager s_resourceManager; internal static ResourceManager ResourceManager => s_resourceManager ?? (s_resourceManager = new ResourceManager(typeof(FxResources.System.Diagnostics.DiagnosticSource.SR))); internal static string ActivityIdFormatInvalid => GetResourceString("ActivityIdFormatInvalid"); internal static string ActivityNotRunning => GetResourceString("ActivityNotRunning"); internal static string ActivityNotStarted => GetResourceString("ActivityNotStarted"); internal static string ActivityStartAlreadyStarted => GetResourceString("ActivityStartAlreadyStarted"); internal static string ActivitySetParentAlreadyStarted => GetResourceString("ActivitySetParentAlreadyStarted"); internal static string EndTimeNotUtc => GetResourceString("EndTimeNotUtc"); internal static string OperationNameInvalid => GetResourceString("OperationNameInvalid"); internal static string ParentIdAlreadySet => GetResourceString("ParentIdAlreadySet"); internal static string ParentIdInvalid => GetResourceString("ParentIdInvalid"); internal static string SetFormatOnStartedActivity => GetResourceString("SetFormatOnStartedActivity"); internal static string SetParentIdOnActivityWithParent => GetResourceString("SetParentIdOnActivityWithParent"); internal static string StartTimeNotUtc => GetResourceString("StartTimeNotUtc"); internal static string KeyAlreadyExist => GetResourceString("KeyAlreadyExist"); internal static string InvalidTraceParent => GetResourceString("InvalidTraceParent"); internal static string UnsupportedType => GetResourceString("UnsupportedType"); internal static string Arg_BufferTooSmall => GetResourceString("Arg_BufferTooSmall"); internal static string InvalidHistogramExplicitBucketBoundaries => GetResourceString("InvalidHistogramExplicitBucketBoundaries"); private static bool GetUsingResourceKeysSwitchValue() { if (!AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool isEnabled)) return false; return isEnabled; } internal static bool UsingResourceKeys() { return s_usingResourceKeys; } private static string GetResourceString(string resourceKey) { if (!UsingResourceKeys()) { string result = null; try { result = ResourceManager.GetString(resourceKey); return result; } catch (MissingManifestResourceException) { return result; } } return resourceKey; } internal static string Format(string resourceFormat, object p1) { if (UsingResourceKeys()) { global::<>y__InlineArray2<object> buffer = default(global::<>y__InlineArray2<object>); global::<PrivateImplementationDetails>.InlineArrayElementRef<global::<>y__InlineArray2<object>, object>(ref buffer, 0) = resourceFormat; global::<PrivateImplementationDetails>.InlineArrayElementRef<global::<>y__InlineArray2<object>, object>(ref buffer, 1) = p1; return string.Join(", ", global::<PrivateImplementationDetails>.InlineArrayAsReadOnlySpan<global::<>y__InlineArray2<object>, object>(ref buffer, 2)); } return string.Format(resourceFormat, p1); } } }