| File: Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\Logging.g.cs | |
| Project: ..\..\..\test\Libraries\Microsoft.Extensions.Diagnostics.Testing.Tests\Microsoft.Extensions.Diagnostics.Testing.Tests.csproj (Microsoft.Extensions.Diagnostics.Testing.Tests) |
// <auto-generated/> #nullable enable namespace Microsoft.Extensions.Logging.Testing.Test.Logging { partial class TestLog { /// <summary> /// Logs "Hello {name}" at "Error" level. /// </summary> [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] public static partial void Hello(this global::Microsoft.Extensions.Logging.ILogger logger, string name) { var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState; try { _ = state.ReserveTagSpace(2); state.TagArray[1] = new("{OriginalFormat}", "Hello {name}"); state.TagArray[0] = new("name", name); logger.Log( global::Microsoft.Extensions.Logging.LogLevel.Error, new(0, nameof(Hello)), state, null, [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) => { var name = s.TagArray[0].Value ?? "(null)"; #if NET return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"Hello {name}"); #else return global::System.FormattableString.Invariant($"Hello {name}"); #endif }); } finally { state.Clear(); } } } }