// <auto-generated/>
#nullable enable
partial class NonSensitiveRecordExtensions
{
partial class Logging
{
/// <summary>
/// Logs "Logging User: {User}" at "Information" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void LogUser(global::Microsoft.Extensions.Logging.ILogger logger, global::NonSensitiveRecordExtensions.User user)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Information))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(4);
state.TagArray[3] = new("{OriginalFormat}", "Logging User: {User}");
state.TagArray[2] = new("User", user);
state.TagArray[1] = new("user.Id", user?.Id);
state.TagArray[0] = new("user.Email", user?.Email);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Information,
new(6001, nameof(LogUser)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var user = s.TagArray[2].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"Logging User: {user}");
#else
return global::System.FormattableString.Invariant($"Logging User: {user}");
#endif
});
}
finally
{
state.Clear();
}
}
}
}
partial class NoNamespace
{
/// <summary>
/// Logs "Could not open socket to `{hostName}`" at "Critical" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void CouldNotOpenSocket(global::Microsoft.Extensions.Logging.ILogger logger, string hostName)
{
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "Could not open socket to `{hostName}`");
state.TagArray[0] = new("hostName", hostName);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Critical,
new(0, nameof(CouldNotOpenSocket)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var hostName = s.TagArray[0].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"Could not open socket to `{hostName}`");
#else
return global::System.FormattableString.Invariant($"Could not open socket to `{hostName}`");
#endif
});
}
finally
{
state.Clear();
}
}
}
namespace FileScopedNamespace
{
partial class Log
{
/// <summary>
/// Logs "Could not open socket to `{hostName}`" at "Critical" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void CouldNotOpenSocket(global::Microsoft.Extensions.Logging.ILogger logger, string hostName)
{
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "Could not open socket to `{hostName}`");
state.TagArray[0] = new("hostName", hostName);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Critical,
new(1, nameof(CouldNotOpenSocket)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var hostName = s.TagArray[0].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"Could not open socket to `{hostName}`");
#else
return global::System.FormattableString.Invariant($"Could not open socket to `{hostName}`");
#endif
});
}
finally
{
state.Clear();
}
}
}
}
namespace Level1.Level2
{
partial class TwoLevelNamespace
{
/// <summary>
/// Logs "Could not open socket to `{hostName}`" at "Critical" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void CouldNotOpenSocket(global::Microsoft.Extensions.Logging.ILogger logger, string hostName)
{
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "Could not open socket to `{hostName}`");
state.TagArray[0] = new("hostName", hostName);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Critical,
new(0, nameof(CouldNotOpenSocket)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var hostName = s.TagArray[0].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"Could not open socket to `{hostName}`");
#else
return global::System.FormattableString.Invariant($"Could not open socket to `{hostName}`");
#endif
});
}
finally
{
state.Clear();
}
}
}
}
namespace Level1
{
partial class OneLevelNamespace
{
/// <summary>
/// Logs "Could not open socket to `{hostName}`" at "Critical" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void CouldNotOpenSocket(global::Microsoft.Extensions.Logging.ILogger logger, string hostName)
{
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "Could not open socket to `{hostName}`");
state.TagArray[0] = new("hostName", hostName);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Critical,
new(0, nameof(CouldNotOpenSocket)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var hostName = s.TagArray[0].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"Could not open socket to `{hostName}`");
#else
return global::System.FormattableString.Invariant($"Could not open socket to `{hostName}`");
#endif
});
}
finally
{
state.Clear();
}
}
}
}
namespace TestClasses
{
partial class ArgTestExtensions
{
/// <summary>
/// Logs "M1" at "Error" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void Method1(global::Microsoft.Extensions.Logging.ILogger logger)
{
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("{OriginalFormat}", "M1");
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Error,
new(0, nameof(Method1)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return "M1";
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M2 {p1}" at "Error" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void Method2(global::Microsoft.Extensions.Logging.ILogger logger, string p1)
{
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "M2 {p1}");
state.TagArray[0] = new("p1", p1);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Error,
new(1, nameof(Method2)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p1 = s.TagArray[0].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M2 {p1}");
#else
return global::System.FormattableString.Invariant($"M2 {p1}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M3 {p1} {p2}" at "Error" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void Method3(global::Microsoft.Extensions.Logging.ILogger logger, string p1, int p2)
{
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(3);
state.TagArray[2] = new("{OriginalFormat}", "M3 {p1} {p2}");
state.TagArray[1] = new("p1", p1);
state.TagArray[0] = new("p2", p2);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Error,
new(2, nameof(Method3)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p1 = s.TagArray[1].Value ?? "(null)";
var p2 = s.TagArray[0].Value;
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M3 {p1} {p2}");
#else
return global::System.FormattableString.Invariant($"M3 {p1} {p2}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M4" at "Error" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void Method4(global::Microsoft.Extensions.Logging.ILogger logger, global::System.InvalidOperationException p1)
{
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("{OriginalFormat}", "M4");
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Error,
new(3, nameof(Method4)),
state,
p1,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return "M4";
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M5 {p2}" at "Error" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void Method5(global::Microsoft.Extensions.Logging.ILogger logger, global::System.InvalidOperationException p1, global::System.InvalidOperationException p2)
{
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "M5 {p2}");
state.TagArray[0] = new("p2", p2);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Error,
new(4, nameof(Method5)),
state,
p1,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p2 = s.TagArray[0].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M5 {p2}");
#else
return global::System.FormattableString.Invariant($"M5 {p2}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M6 {p2}" at "Error" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void Method6(global::Microsoft.Extensions.Logging.ILogger logger, global::System.InvalidOperationException p1, int p2)
{
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "M6 {p2}");
state.TagArray[0] = new("p2", p2);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Error,
new(5, nameof(Method6)),
state,
p1,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p2 = s.TagArray[0].Value;
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M6 {p2}");
#else
return global::System.FormattableString.Invariant($"M6 {p2}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M7 {p1}" at "Error" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void Method7(global::Microsoft.Extensions.Logging.ILogger logger, int p1, global::System.InvalidOperationException p2)
{
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "M7 {p1}");
state.TagArray[0] = new("p1", p1);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Error,
new(6, nameof(Method7)),
state,
p2,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p1 = s.TagArray[0].Value;
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M7 {p1}");
#else
return global::System.FormattableString.Invariant($"M7 {p1}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M8{p1}{p2}{p3}{p4}{p5}{p6}{p7}" at "Error" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void Method8(global::Microsoft.Extensions.Logging.ILogger logger, int p1, int p2, int p3, int p4, int p5, int p6, int p7)
{
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(8);
state.TagArray[7] = new("{OriginalFormat}", "M8{p1}{p2}{p3}{p4}{p5}{p6}{p7}");
state.TagArray[6] = new("p1", p1);
state.TagArray[5] = new("p2", p2);
state.TagArray[4] = new("p3", p3);
state.TagArray[3] = new("p4", p4);
state.TagArray[2] = new("p5", p5);
state.TagArray[1] = new("p6", p6);
state.TagArray[0] = new("p7", p7);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Error,
new(7, nameof(Method8)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p1 = s.TagArray[6].Value;
var p2 = s.TagArray[5].Value;
var p3 = s.TagArray[4].Value;
var p4 = s.TagArray[3].Value;
var p5 = s.TagArray[2].Value;
var p6 = s.TagArray[1].Value;
var p7 = s.TagArray[0].Value;
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M8{p1}{p2}{p3}{p4}{p5}{p6}{p7}");
#else
return global::System.FormattableString.Invariant($"M8{p1}{p2}{p3}{p4}{p5}{p6}{p7}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M9 {p1} {p2} {p3} {p4} {p5} {p6} {p7}" at "Error" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void Method9(global::Microsoft.Extensions.Logging.ILogger logger, int p1, int p2, int p3, int p4, int p5, int p6, int p7)
{
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(8);
state.TagArray[7] = new("{OriginalFormat}", "M9 {p1} {p2} {p3} {p4} {p5} {p6} {p7}");
state.TagArray[6] = new("p1", p1);
state.TagArray[5] = new("p2", p2);
state.TagArray[4] = new("p3", p3);
state.TagArray[3] = new("p4", p4);
state.TagArray[2] = new("p5", p5);
state.TagArray[1] = new("p6", p6);
state.TagArray[0] = new("p7", p7);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Error,
new(8, nameof(Method9)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p1 = s.TagArray[6].Value;
var p2 = s.TagArray[5].Value;
var p3 = s.TagArray[4].Value;
var p4 = s.TagArray[3].Value;
var p5 = s.TagArray[2].Value;
var p6 = s.TagArray[1].Value;
var p7 = s.TagArray[0].Value;
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M9 {p1} {p2} {p3} {p4} {p5} {p6} {p7}");
#else
return global::System.FormattableString.Invariant($"M9 {p1} {p2} {p3} {p4} {p5} {p6} {p7}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M10{p1}" at "Error" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void Method10(global::Microsoft.Extensions.Logging.ILogger logger, int p1)
{
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "M10{p1}");
state.TagArray[0] = new("p1", p1);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Error,
new(9, nameof(Method10)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p1 = s.TagArray[0].Value;
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M10{p1}");
#else
return global::System.FormattableString.Invariant($"M10{p1}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "{RequestId} {First} {Second} {Third}" at "Error" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void Method11(global::Microsoft.Extensions.Logging.ILogger logger, string requestId, string first, string second, string third)
{
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(5);
state.TagArray[4] = new("{OriginalFormat}", "{RequestId} {First} {Second} {Third}");
state.TagArray[3] = new("RequestId", requestId);
state.TagArray[2] = new("First", first);
state.TagArray[1] = new("Second", second);
state.TagArray[0] = new("Third", third);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Error,
new(10, nameof(Method11)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var requestId = s.TagArray[3].Value ?? "(null)";
var first = s.TagArray[2].Value ?? "(null)";
var second = s.TagArray[1].Value ?? "(null)";
var third = s.TagArray[0].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"{requestId} {first} {second} {third}");
#else
return global::System.FormattableString.Invariant($"{requestId} {first} {second} {third}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "{RequestId}" at "Error" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void Method12(global::Microsoft.Extensions.Logging.ILogger logger, string requestId)
{
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "{RequestId}");
state.TagArray[0] = new("RequestId", requestId);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Error,
new(11, nameof(Method12)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var requestId = s.TagArray[0].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"{requestId}");
#else
return global::System.FormattableString.Invariant($"{requestId}");
#endif
});
}
finally
{
state.Clear();
}
}
}
}
namespace TestClasses
{
partial class AtSymbolsTestExtensions
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
private static readonly global::Microsoft.Extensions.Compliance.Classification.DataClassification _Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute = new global::Microsoft.Extensions.Compliance.Testing.PrivateDataAttribute().Classification;
/// <summary>
/// Logs "M0 {event}" at "Information" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
internal static partial void M0(global::Microsoft.Extensions.Logging.ILogger logger, string @event)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Information))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "M0 {event}");
state.TagArray[0] = new("event", @event);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Information,
new(0, nameof(M0)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var @event = s.TagArray[0].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M0 {@event}");
#else
return global::System.FormattableString.Invariant($"M0 {@event}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M1 {@myevent1}" at "Information" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
internal static partial void M1(global::Microsoft.Extensions.Logging.ILogger logger, string @myevent1)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Information))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("{OriginalFormat}", "M1 {@myevent1}");
_ = state.ReserveClassifiedTagSpace(1);
state.ClassifiedTagArray[0] = new("@myevent1", @myevent1, new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute));
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Information,
new(1, nameof(M1)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var @myevent1 = s.RedactedTagArray[0].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M1 {@myevent1}");
#else
return global::System.FormattableString.Invariant($"M1 {@myevent1}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "UseAtSymbol3, {@myevent2} {otherevent}".
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void UseAtSymbol3(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.Extensions.Logging.LogLevel level, string @myevent2, int otherevent)
{
if (!logger.IsEnabled(level))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(3);
state.TagArray[2] = new("{OriginalFormat}", "UseAtSymbol3, {@myevent2} {otherevent}");
state.TagArray[1] = new("@myevent2", @myevent2);
state.TagArray[0] = new("otherevent", otherevent);
logger.Log(
level,
new(2, nameof(UseAtSymbol3)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var @myevent2 = s.TagArray[1].Value ?? "(null)";
var otherevent = s.TagArray[0].Value;
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"UseAtSymbol3, {@myevent2} {otherevent}");
#else
return global::System.FormattableString.Invariant($"UseAtSymbol3, {@myevent2} {otherevent}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "UseAtSymbol4 with error, {@myevent3} {otherevent}".
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void UseAtSymbol4(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.Extensions.Logging.LogLevel level, string @myevent3, int otherevent, global::System.Exception ex)
{
if (!logger.IsEnabled(level))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(3);
state.TagArray[2] = new("{OriginalFormat}", "UseAtSymbol4 with error, {@myevent3} {otherevent}");
state.TagArray[1] = new("@myevent3", @myevent3);
state.TagArray[0] = new("otherevent", otherevent);
logger.Log(
level,
new(3, nameof(UseAtSymbol4)),
state,
ex,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var @myevent3 = s.TagArray[1].Value ?? "(null)";
var otherevent = s.TagArray[0].Value;
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"UseAtSymbol4 with error, {@myevent3} {otherevent}");
#else
return global::System.FormattableString.Invariant($"UseAtSymbol4 with error, {@myevent3} {otherevent}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M2 {Event}".
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
internal static partial void M2(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.Extensions.Logging.LogLevel level, string @event)
{
if (!logger.IsEnabled(level))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "M2 {Event}");
state.TagArray[0] = new("Event", @event);
logger.Log(
level,
new(350193950, nameof(M2)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var @event = s.TagArray[0].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M2 {@event}");
#else
return global::System.FormattableString.Invariant($"M2 {@event}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M3".
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
internal static partial void M3(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.Extensions.Logging.LogLevel level, global::TestClasses.AtSymbolsTestExtensions.SpecialNames @event)
{
if (!logger.IsEnabled(level))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "M3");
state.TagArray[0] = new("event.class", @event?.@class);
logger.Log(
level,
new(366971569, nameof(M3)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return "M3";
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M4 {class}" at "Information" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
internal static partial void M4(global::Microsoft.Extensions.Logging.ILogger logger, string @class)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Information))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "M4 {class}");
state.TagArray[0] = new("class", @class);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Information,
new(383749188, nameof(M4)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var @class = s.TagArray[0].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M4 {@class}");
#else
return global::System.FormattableString.Invariant($"M4 {@class}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M5".
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
internal static partial void M5(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.Extensions.Logging.LogLevel level, global::TestClasses.AtSymbolsTestExtensions.SpecialNames @event)
{
if (!logger.IsEnabled(level))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "M5");
state.TagArray[0] = new("class", @event?.@class);
logger.Log(
level,
new(400526807, nameof(M5)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return "M5";
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M6 class {class}" at "Information" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
internal static partial void M6(global::Microsoft.Extensions.Logging.ILogger logger, string @class)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Information))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "M6 class {class}");
state.TagArray[0] = new("class", @class);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Information,
new(417304426, nameof(M6)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var @class = s.TagArray[0].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M6 class {@class}");
#else
return global::System.FormattableString.Invariant($"M6 class {@class}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M7 param {@param}" at "Information" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
internal static partial void M7(global::Microsoft.Extensions.Logging.ILogger logger, string param)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Information))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "M7 param {@param}");
state.TagArray[0] = new("@param", param);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Information,
new(434082045, nameof(M7)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var param = s.TagArray[0].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M7 param {param}");
#else
return global::System.FormattableString.Invariant($"M7 param {param}");
#endif
});
}
finally
{
state.Clear();
}
}
}
}
namespace TestClasses
{
partial class AttributeTestExtensions
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
private static readonly global::Microsoft.Extensions.Compliance.Classification.DataClassification _Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute = new global::Microsoft.Extensions.Compliance.Testing.PrivateDataAttribute().Classification;
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
private static readonly global::Microsoft.Extensions.Compliance.Classification.DataClassification _Microsoft_Extensions_Compliance_Testing_PublicDataAttribute = new global::Microsoft.Extensions.Compliance.Testing.PublicDataAttribute().Classification;
/// <summary>
/// Logs "M0 {p0}" at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M0(global::Microsoft.Extensions.Logging.ILogger logger, string p0)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "M0 {p0}");
state.TagArray[0] = new("p0", p0);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(0, nameof(M0)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p0 = s.TagArray[0].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M0 {p0}");
#else
return global::System.FormattableString.Invariant($"M0 {p0}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M1 {p0} {p1}" at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M1(global::Microsoft.Extensions.Logging.ILogger logger, string p0, string p1)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "M1 {p0} {p1}");
state.TagArray[0] = new("p1", p1);
_ = state.ReserveClassifiedTagSpace(1);
state.ClassifiedTagArray[0] = new("p0", p0, new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute));
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(1, nameof(M1)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p1 = s.TagArray[0].Value ?? "(null)";
var p0 = s.RedactedTagArray[0].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M1 {p0} {p1}");
#else
return global::System.FormattableString.Invariant($"M1 {p0} {p1}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M2 {p0} {p1}" at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M2(global::Microsoft.Extensions.Logging.ILogger logger, string p0, string p1)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "M2 {p0} {p1}");
state.TagArray[0] = new("p1", p1);
_ = state.ReserveClassifiedTagSpace(1);
state.ClassifiedTagArray[0] = new("p0", p0, new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute));
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(2, nameof(M2)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p1 = s.TagArray[0].Value ?? "(null)";
var p0 = s.RedactedTagArray[0].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M2 {p0} {p1}");
#else
return global::System.FormattableString.Invariant($"M2 {p0} {p1}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M3 {p0} {p1} {p2} {p3}" at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M3(global::Microsoft.Extensions.Logging.ILogger logger, string p0, string p1, string p2, string p3)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("{OriginalFormat}", "M3 {p0} {p1} {p2} {p3}");
_ = state.ReserveClassifiedTagSpace(4);
state.ClassifiedTagArray[3] = new("p0", p0, new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute));
state.ClassifiedTagArray[2] = new("p1", p1, new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute));
state.ClassifiedTagArray[1] = new("p2", p2, new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute));
state.ClassifiedTagArray[0] = new("p3", p3, new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute));
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(3, nameof(M3)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p0 = s.RedactedTagArray[3].Value ?? "(null)";
var p1 = s.RedactedTagArray[2].Value ?? "(null)";
var p2 = s.RedactedTagArray[1].Value ?? "(null)";
var p3 = s.RedactedTagArray[0].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M3 {p0} {p1} {p2} {p3}");
#else
return global::System.FormattableString.Invariant($"M3 {p0} {p1} {p2} {p3}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M4 {p0} {p1} {p2} {p3}" at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M4(global::Microsoft.Extensions.Logging.ILogger logger, string p0, string p1, string p2, global::TestClasses.NonFormattable p3)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("{OriginalFormat}", "M4 {p0} {p1} {p2} {p3}");
_ = state.ReserveClassifiedTagSpace(4);
state.ClassifiedTagArray[3] = new("p0", p0, new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute));
state.ClassifiedTagArray[2] = new("p1", p1, new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute));
state.ClassifiedTagArray[1] = new("p2", p2, new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute));
state.ClassifiedTagArray[0] = new("p3", p3.ToString(), new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute));
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(4, nameof(M4)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p0 = s.RedactedTagArray[3].Value ?? "(null)";
var p1 = s.RedactedTagArray[2].Value ?? "(null)";
var p2 = s.RedactedTagArray[1].Value ?? "(null)";
var p3 = s.RedactedTagArray[0].Value;
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M4 {p0} {p1} {p2} {p3}");
#else
return global::System.FormattableString.Invariant($"M4 {p0} {p1} {p2} {p3}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M5 {p0} {p1} {p2} {p3} {p4} {p5} {p6} {p7} {p8} {p9} {p10}" at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M5(global::Microsoft.Extensions.Logging.ILogger logger, string p0, string p1, string p2, string p3, string p4, string p5, string p6, string p7, string p8, string p9, string p10)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("{OriginalFormat}", "M5 {p0} {p1} {p2} {p3} {p4} {p5} {p6} {p7} {p8} {p9} {p10}");
_ = state.ReserveClassifiedTagSpace(11);
state.ClassifiedTagArray[10] = new("p0", p0, new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute));
state.ClassifiedTagArray[9] = new("p1", p1, new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute));
state.ClassifiedTagArray[8] = new("p2", p2, new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute));
state.ClassifiedTagArray[7] = new("p3", p3, new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute));
state.ClassifiedTagArray[6] = new("p4", p4, new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute));
state.ClassifiedTagArray[5] = new("p5", p5, new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute));
state.ClassifiedTagArray[4] = new("p6", p6, new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute));
state.ClassifiedTagArray[3] = new("p7", p7, new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute));
state.ClassifiedTagArray[2] = new("p8", p8, new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PublicDataAttribute));
state.ClassifiedTagArray[1] = new("p9", p9, new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PublicDataAttribute));
state.ClassifiedTagArray[0] = new("p10", p10, new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PublicDataAttribute));
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(5, nameof(M5)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p0 = s.RedactedTagArray[10].Value ?? "(null)";
var p1 = s.RedactedTagArray[9].Value ?? "(null)";
var p2 = s.RedactedTagArray[8].Value ?? "(null)";
var p3 = s.RedactedTagArray[7].Value ?? "(null)";
var p4 = s.RedactedTagArray[6].Value ?? "(null)";
var p5 = s.RedactedTagArray[5].Value ?? "(null)";
var p6 = s.RedactedTagArray[4].Value ?? "(null)";
var p7 = s.RedactedTagArray[3].Value ?? "(null)";
var p8 = s.RedactedTagArray[2].Value ?? "(null)";
var p9 = s.RedactedTagArray[1].Value ?? "(null)";
var p10 = s.RedactedTagArray[0].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M5 {p0} {p1} {p2} {p3} {p4} {p5} {p6} {p7} {p8} {p9} {p10}");
#else
return global::System.FormattableString.Invariant($"M5 {p0} {p1} {p2} {p3} {p4} {p5} {p6} {p7} {p8} {p9} {p10}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Emits a structured log entry.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M6(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.Extensions.Logging.LogLevel level, string p0, string p1)
{
if (!logger.IsEnabled(level))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("p1", p1);
_ = state.ReserveClassifiedTagSpace(1);
state.ClassifiedTagArray[0] = new("p0", p0, new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute));
logger.Log(
level,
new(417304426, nameof(M6)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return string.Empty;
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Emits a structured log entry.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M7(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.Extensions.Logging.LogLevel level, string p0, string p1)
{
if (!logger.IsEnabled(level))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("p1", p1);
_ = state.ReserveClassifiedTagSpace(1);
state.ClassifiedTagArray[0] = new("p0", p0, new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute));
logger.Log(
level,
new(434082045, nameof(M7)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return string.Empty;
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M8 {p0}" at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M8(global::Microsoft.Extensions.Logging.ILogger logger, int p0)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("{OriginalFormat}", "M8 {p0}");
_ = state.ReserveClassifiedTagSpace(1);
state.ClassifiedTagArray[0] = new("p0", p0, new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute));
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(8, nameof(M8)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p0 = s.RedactedTagArray[0].Value;
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M8 {p0}");
#else
return global::System.FormattableString.Invariant($"M8 {p0}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M9 {p0}" at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M9(global::Microsoft.Extensions.Logging.ILogger logger, global::TestClasses.CustomToStringTestClass p0)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("{OriginalFormat}", "M9 {p0}");
_ = state.ReserveClassifiedTagSpace(1);
state.ClassifiedTagArray[0] = new("p0", p0, new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute));
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(9, nameof(M9)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p0 = s.RedactedTagArray[0].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M9 {p0}");
#else
return global::System.FormattableString.Invariant($"M9 {p0}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M10 {p0}" at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M10(global::Microsoft.Extensions.Logging.ILogger logger, global::TestClasses.NonFormattable p0)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("{OriginalFormat}", "M10 {p0}");
_ = state.ReserveClassifiedTagSpace(1);
state.ClassifiedTagArray[0] = new("p0", p0.ToString(), new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute));
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(10, nameof(M10)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p0 = s.RedactedTagArray[0].Value;
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M10 {p0}");
#else
return global::System.FormattableString.Invariant($"M10 {p0}");
#endif
});
}
finally
{
state.Clear();
}
}
}
}
namespace TestClasses
{
partial class ClassWithPrimaryConstructor
{
/// <summary>
/// Logs "Test." at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public partial void Test()
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("{OriginalFormat}", "Test.");
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(0, nameof(Test)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return "Test.";
});
}
finally
{
state.Clear();
}
}
}
}
namespace TestClasses
{
partial class ClassWithPrimaryConstructorAndField
{
/// <summary>
/// Logs "Test." at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public partial void Test()
{
if (!_logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("{OriginalFormat}", "Test.");
_logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(0, nameof(Test)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return "Test.";
});
}
finally
{
state.Clear();
}
}
}
}
namespace TestClasses
{
partial class ClassWithPrimaryConstructorInDifferentPartialDeclaration
{
/// <summary>
/// Logs "Test." at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public partial void Test()
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("{OriginalFormat}", "Test.");
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(0, nameof(Test)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return "Test.";
});
}
finally
{
state.Clear();
}
}
}
}
namespace TestClasses
{
partial class CollectionTestExtensions
{
/// <summary>
/// Logs "M0" at "Error" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M0(global::Microsoft.Extensions.Logging.ILogger logger)
{
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("{OriginalFormat}", "M0");
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Error,
new(0, nameof(M0)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return "M0";
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M1{p0}" at "Error" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M1(global::Microsoft.Extensions.Logging.ILogger logger, int p0)
{
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "M1{p0}");
state.TagArray[0] = new("p0", p0);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Error,
new(1, nameof(M1)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p0 = s.TagArray[0].Value;
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M1{p0}");
#else
return global::System.FormattableString.Invariant($"M1{p0}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M2{p0}{p1}" at "Error" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M2(global::Microsoft.Extensions.Logging.ILogger logger, int p0, int p1)
{
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(3);
state.TagArray[2] = new("{OriginalFormat}", "M2{p0}{p1}");
state.TagArray[1] = new("p0", p0);
state.TagArray[0] = new("p1", p1);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Error,
new(2, nameof(M2)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p0 = s.TagArray[1].Value;
var p1 = s.TagArray[0].Value;
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M2{p0}{p1}");
#else
return global::System.FormattableString.Invariant($"M2{p0}{p1}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M3{p0}{p1}{p2}" at "Error" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M3(global::Microsoft.Extensions.Logging.ILogger logger, int p0, int p1, int p2)
{
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(4);
state.TagArray[3] = new("{OriginalFormat}", "M3{p0}{p1}{p2}");
state.TagArray[2] = new("p0", p0);
state.TagArray[1] = new("p1", p1);
state.TagArray[0] = new("p2", p2);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Error,
new(3, nameof(M3)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p0 = s.TagArray[2].Value;
var p1 = s.TagArray[1].Value;
var p2 = s.TagArray[0].Value;
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M3{p0}{p1}{p2}");
#else
return global::System.FormattableString.Invariant($"M3{p0}{p1}{p2}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M4{p0}{p1}{p2}{p3}" at "Error" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M4(global::Microsoft.Extensions.Logging.ILogger logger, int p0, int p1, int p2, int p3)
{
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(5);
state.TagArray[4] = new("{OriginalFormat}", "M4{p0}{p1}{p2}{p3}");
state.TagArray[3] = new("p0", p0);
state.TagArray[2] = new("p1", p1);
state.TagArray[1] = new("p2", p2);
state.TagArray[0] = new("p3", p3);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Error,
new(4, nameof(M4)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p0 = s.TagArray[3].Value;
var p1 = s.TagArray[2].Value;
var p2 = s.TagArray[1].Value;
var p3 = s.TagArray[0].Value;
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M4{p0}{p1}{p2}{p3}");
#else
return global::System.FormattableString.Invariant($"M4{p0}{p1}{p2}{p3}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M5{p0}{p1}{p2}{p3}{p4}" at "Error" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M5(global::Microsoft.Extensions.Logging.ILogger logger, int p0, int p1, int p2, int p3, int p4)
{
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(6);
state.TagArray[5] = new("{OriginalFormat}", "M5{p0}{p1}{p2}{p3}{p4}");
state.TagArray[4] = new("p0", p0);
state.TagArray[3] = new("p1", p1);
state.TagArray[2] = new("p2", p2);
state.TagArray[1] = new("p3", p3);
state.TagArray[0] = new("p4", p4);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Error,
new(5, nameof(M5)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p0 = s.TagArray[4].Value;
var p1 = s.TagArray[3].Value;
var p2 = s.TagArray[2].Value;
var p3 = s.TagArray[1].Value;
var p4 = s.TagArray[0].Value;
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M5{p0}{p1}{p2}{p3}{p4}");
#else
return global::System.FormattableString.Invariant($"M5{p0}{p1}{p2}{p3}{p4}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M6{p0}{p1}{p2}{p3}{p4}{p5}" at "Error" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M6(global::Microsoft.Extensions.Logging.ILogger logger, int p0, int p1, int p2, int p3, int p4, int p5)
{
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(7);
state.TagArray[6] = new("{OriginalFormat}", "M6{p0}{p1}{p2}{p3}{p4}{p5}");
state.TagArray[5] = new("p0", p0);
state.TagArray[4] = new("p1", p1);
state.TagArray[3] = new("p2", p2);
state.TagArray[2] = new("p3", p3);
state.TagArray[1] = new("p4", p4);
state.TagArray[0] = new("p5", p5);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Error,
new(6, nameof(M6)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p0 = s.TagArray[5].Value;
var p1 = s.TagArray[4].Value;
var p2 = s.TagArray[3].Value;
var p3 = s.TagArray[2].Value;
var p4 = s.TagArray[1].Value;
var p5 = s.TagArray[0].Value;
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M6{p0}{p1}{p2}{p3}{p4}{p5}");
#else
return global::System.FormattableString.Invariant($"M6{p0}{p1}{p2}{p3}{p4}{p5}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M7{p0}{p1}{p2}{p3}{p4}{p5}{p6}" at "Error" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M7(global::Microsoft.Extensions.Logging.ILogger logger, int p0, int p1, int p2, int p3, int p4, int p5, int p6)
{
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(8);
state.TagArray[7] = new("{OriginalFormat}", "M7{p0}{p1}{p2}{p3}{p4}{p5}{p6}");
state.TagArray[6] = new("p0", p0);
state.TagArray[5] = new("p1", p1);
state.TagArray[4] = new("p2", p2);
state.TagArray[3] = new("p3", p3);
state.TagArray[2] = new("p4", p4);
state.TagArray[1] = new("p5", p5);
state.TagArray[0] = new("p6", p6);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Error,
new(7, nameof(M7)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p0 = s.TagArray[6].Value;
var p1 = s.TagArray[5].Value;
var p2 = s.TagArray[4].Value;
var p3 = s.TagArray[3].Value;
var p4 = s.TagArray[2].Value;
var p5 = s.TagArray[1].Value;
var p6 = s.TagArray[0].Value;
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M7{p0}{p1}{p2}{p3}{p4}{p5}{p6}");
#else
return global::System.FormattableString.Invariant($"M7{p0}{p1}{p2}{p3}{p4}{p5}{p6}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M8{p0}{p1}{p2}{p3}{p4}{p5}{p6}{p7}" at "Error" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M8(global::Microsoft.Extensions.Logging.ILogger logger, int p0, int p1, int p2, int p3, int p4, int p5, int p6, int p7)
{
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(9);
state.TagArray[8] = new("{OriginalFormat}", "M8{p0}{p1}{p2}{p3}{p4}{p5}{p6}{p7}");
state.TagArray[7] = new("p0", p0);
state.TagArray[6] = new("p1", p1);
state.TagArray[5] = new("p2", p2);
state.TagArray[4] = new("p3", p3);
state.TagArray[3] = new("p4", p4);
state.TagArray[2] = new("p5", p5);
state.TagArray[1] = new("p6", p6);
state.TagArray[0] = new("p7", p7);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Error,
new(8, nameof(M8)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p0 = s.TagArray[7].Value;
var p1 = s.TagArray[6].Value;
var p2 = s.TagArray[5].Value;
var p3 = s.TagArray[4].Value;
var p4 = s.TagArray[3].Value;
var p5 = s.TagArray[2].Value;
var p6 = s.TagArray[1].Value;
var p7 = s.TagArray[0].Value;
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M8{p0}{p1}{p2}{p3}{p4}{p5}{p6}{p7}");
#else
return global::System.FormattableString.Invariant($"M8{p0}{p1}{p2}{p3}{p4}{p5}{p6}{p7}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M8{p0}{p1}".
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M9(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.Extensions.Logging.LogLevel level, int p0, global::System.Exception ex, int p1)
{
if (!logger.IsEnabled(level))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(3);
state.TagArray[2] = new("{OriginalFormat}", "M8{p0}{p1}");
state.TagArray[1] = new("p0", p0);
state.TagArray[0] = new("p1", p1);
logger.Log(
level,
new(199195379, nameof(M9)),
state,
ex,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p0 = s.TagArray[1].Value;
var p1 = s.TagArray[0].Value;
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M8{p0}{p1}");
#else
return global::System.FormattableString.Invariant($"M8{p0}{p1}");
#endif
});
}
finally
{
state.Clear();
}
}
}
}
namespace TestClasses
{
partial class ConstraintsTestExtensions<T>
{
/// <summary>
/// Logs "M0{p0}" at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M0(global::Microsoft.Extensions.Logging.ILogger logger, int p0)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "M0{p0}");
state.TagArray[0] = new("p0", p0);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(0, nameof(M0)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p0 = s.TagArray[0].Value;
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M0{p0}");
#else
return global::System.FormattableString.Invariant($"M0{p0}");
#endif
});
}
finally
{
state.Clear();
}
}
}
}
namespace TestClasses
{
partial class ConstraintsTestExtensions1<T>
{
/// <summary>
/// Logs "M0{p0}" at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M0(global::Microsoft.Extensions.Logging.ILogger logger, int p0)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "M0{p0}");
state.TagArray[0] = new("p0", p0);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(0, nameof(M0)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p0 = s.TagArray[0].Value;
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M0{p0}");
#else
return global::System.FormattableString.Invariant($"M0{p0}");
#endif
});
}
finally
{
state.Clear();
}
}
}
}
namespace TestClasses
{
partial class ConstraintsTestExtensions2<T>
{
/// <summary>
/// Logs "M0{p0}" at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M0(global::Microsoft.Extensions.Logging.ILogger logger, int p0)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "M0{p0}");
state.TagArray[0] = new("p0", p0);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(0, nameof(M0)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p0 = s.TagArray[0].Value;
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M0{p0}");
#else
return global::System.FormattableString.Invariant($"M0{p0}");
#endif
});
}
finally
{
state.Clear();
}
}
}
}
namespace TestClasses
{
partial class ConstraintsTestExtensions3<T>
{
/// <summary>
/// Logs "M0{p0}" at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M0(global::Microsoft.Extensions.Logging.ILogger logger, int p0)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "M0{p0}");
state.TagArray[0] = new("p0", p0);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(0, nameof(M0)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p0 = s.TagArray[0].Value;
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M0{p0}");
#else
return global::System.FormattableString.Invariant($"M0{p0}");
#endif
});
}
finally
{
state.Clear();
}
}
}
}
namespace TestClasses
{
partial class ConstraintsTestExtensions4<T>
{
/// <summary>
/// Logs "M0{p0}" at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M0(global::Microsoft.Extensions.Logging.ILogger logger, int p0)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "M0{p0}");
state.TagArray[0] = new("p0", p0);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(0, nameof(M0)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p0 = s.TagArray[0].Value;
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M0{p0}");
#else
return global::System.FormattableString.Invariant($"M0{p0}");
#endif
});
}
finally
{
state.Clear();
}
}
}
}
namespace TestClasses
{
partial class ConstraintsTestExtensions5<T>
{
/// <summary>
/// Logs "M0{p0}" at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M0(global::Microsoft.Extensions.Logging.ILogger logger, int p0)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "M0{p0}");
state.TagArray[0] = new("p0", p0);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(0, nameof(M0)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p0 = s.TagArray[0].Value;
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M0{p0}");
#else
return global::System.FormattableString.Invariant($"M0{p0}");
#endif
});
}
finally
{
state.Clear();
}
}
}
}
namespace TestClasses
{
partial class ConstraintsTestExtensionsMultiple<T>
{
/// <summary>
/// Logs "M0{p0}" at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M0(global::Microsoft.Extensions.Logging.ILogger logger, int p0)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "M0{p0}");
state.TagArray[0] = new("p0", p0);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(0, nameof(M0)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p0 = s.TagArray[0].Value;
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M0{p0}");
#else
return global::System.FormattableString.Invariant($"M0{p0}");
#endif
});
}
finally
{
state.Clear();
}
}
}
}
namespace TestClasses
{
partial class ConstructorVariationsTestExtensions
{
/// <summary>
/// Logs "M0 {p0}" at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M0(global::Microsoft.Extensions.Logging.ILogger logger, string p0)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "M0 {p0}");
state.TagArray[0] = new("p0", p0);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(0, nameof(M0)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p0 = s.TagArray[0].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M0 {p0}");
#else
return global::System.FormattableString.Invariant($"M0 {p0}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M1 {p0}".
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M1(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.Extensions.Logging.LogLevel level, string p0)
{
if (!logger.IsEnabled(level))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "M1 {p0}");
state.TagArray[0] = new("p0", p0);
logger.Log(
level,
new(333416331, nameof(M1)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p0 = s.TagArray[0].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M1 {p0}");
#else
return global::System.FormattableString.Invariant($"M1 {p0}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Emits a structured log entry at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M2(global::Microsoft.Extensions.Logging.ILogger logger, string p0)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("p0", p0);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(350193950, nameof(M2)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return string.Empty;
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Emits a structured log entry.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M3(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.Extensions.Logging.LogLevel level, string p0)
{
if (!logger.IsEnabled(level))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("p0", p0);
logger.Log(
level,
new(366971569, nameof(M3)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return string.Empty;
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M4 {p0}" at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M4(global::Microsoft.Extensions.Logging.ILogger logger, string p0)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "M4 {p0}");
state.TagArray[0] = new("p0", p0);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(383749188, nameof(M4)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p0 = s.TagArray[0].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M4 {p0}");
#else
return global::System.FormattableString.Invariant($"M4 {p0}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M5 {p0}".
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M5(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.Extensions.Logging.LogLevel level, string p0)
{
if (!logger.IsEnabled(level))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "M5 {p0}");
state.TagArray[0] = new("p0", p0);
logger.Log(
level,
new(400526807, nameof(M5)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p0 = s.TagArray[0].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M5 {p0}");
#else
return global::System.FormattableString.Invariant($"M5 {p0}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Emits a structured log entry at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M6(global::Microsoft.Extensions.Logging.ILogger logger, string p0)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("p0", p0);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(417304426, nameof(M6)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return string.Empty;
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Emits a structured log entry.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M7(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.Extensions.Logging.LogLevel level, string p0)
{
if (!logger.IsEnabled(level))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("p0", p0);
logger.Log(
level,
new(434082045, nameof(M7)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return string.Empty;
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M8" at "Trace" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M8(global::Microsoft.Extensions.Logging.ILogger logger, string p0)
{
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "M8");
state.TagArray[0] = new("p0", p0);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Trace,
new(42, "EN1"),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return "M8";
});
}
finally
{
state.Clear();
}
}
}
}
namespace TestClasses
{
partial class DataClassificationTestExtensions
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
private static readonly global::Microsoft.Extensions.Compliance.Classification.DataClassification _Microsoft_Extensions_Compliance_Testing_PublicDataAttribute = new global::Microsoft.Extensions.Compliance.Testing.PublicDataAttribute().Classification;
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
private static readonly global::Microsoft.Extensions.Compliance.Classification.DataClassification _Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute = new global::Microsoft.Extensions.Compliance.Testing.PrivateDataAttribute().Classification;
/// <summary>
/// Logs "M0 {p1}" at "Error" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M0(global::Microsoft.Extensions.Logging.ILogger logger, string p1)
{
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("{OriginalFormat}", "M0 {p1}");
_ = state.ReserveClassifiedTagSpace(1);
state.ClassifiedTagArray[0] = new("p1", p1, new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PublicDataAttribute));
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Error,
new(1, nameof(M0)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p1 = s.RedactedTagArray[0].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M0 {p1}");
#else
return global::System.FormattableString.Invariant($"M0 {p1}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M1 {p1} {p2}" at "Error" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M1(global::Microsoft.Extensions.Logging.ILogger logger, string p1, string p2)
{
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("{OriginalFormat}", "M1 {p1} {p2}");
_ = state.ReserveClassifiedTagSpace(2);
state.ClassifiedTagArray[1] = new("p1", p1, new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PublicDataAttribute, _Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute));
state.ClassifiedTagArray[0] = new("p2", p2, new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PublicDataAttribute));
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Error,
new(2, nameof(M1)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p1 = s.RedactedTagArray[1].Value ?? "(null)";
var p2 = s.RedactedTagArray[0].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M1 {p1} {p2}");
#else
return global::System.FormattableString.Invariant($"M1 {p1} {p2}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M2" at "Error" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M2(global::Microsoft.Extensions.Logging.ILogger logger, global::TestClasses.DataClassificationTestExtensions.C1 p1, global::TestClasses.DataClassificationTestExtensions.C1 p2)
{
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("{OriginalFormat}", "M2");
_ = state.ReserveClassifiedTagSpace(3);
state.ClassifiedTagArray[2] = new("p2", p2, new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute));
state.ClassifiedTagArray[1] = new("p1.P1", p1?.P1, new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PublicDataAttribute));
state.ClassifiedTagArray[0] = new("p1.P2", p1?.P2, new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PublicDataAttribute, _Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute));
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Error,
new(3, nameof(M2)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return "M2";
});
}
finally
{
state.Clear();
}
}
}
}
namespace TestClasses
{
partial class EnumerableTestExtensions
{
/// <summary>
/// Logs "M0" at "Error" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M0(global::Microsoft.Extensions.Logging.ILogger logger)
{
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("{OriginalFormat}", "M0");
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Error,
new(0, nameof(M0)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return "M0";
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M1{p0}" at "Error" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M1(global::Microsoft.Extensions.Logging.ILogger logger, global::System.Collections.Generic.IEnumerable<int> p0)
{
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "M1{p0}");
state.TagArray[0] = new("p0", p0 != null ? global::Microsoft.Extensions.Logging.LoggerMessageHelper.Stringify(p0) : null);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Error,
new(1, nameof(M1)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p0 = s.TagArray[0].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M1{p0}");
#else
return global::System.FormattableString.Invariant($"M1{p0}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M2{p0}{p1}" at "Error" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M2(global::Microsoft.Extensions.Logging.ILogger logger, int p0, global::System.Collections.Generic.IEnumerable<int> p1)
{
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(3);
state.TagArray[2] = new("{OriginalFormat}", "M2{p0}{p1}");
state.TagArray[1] = new("p0", p0);
state.TagArray[0] = new("p1", p1 != null ? global::Microsoft.Extensions.Logging.LoggerMessageHelper.Stringify(p1) : null);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Error,
new(2, nameof(M2)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p0 = s.TagArray[1].Value;
var p1 = s.TagArray[0].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M2{p0}{p1}");
#else
return global::System.FormattableString.Invariant($"M2{p0}{p1}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M3{p0}{p1}{p2}" at "Error" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M3(global::Microsoft.Extensions.Logging.ILogger logger, int p0, global::System.Collections.Generic.IEnumerable<int> p1, int p2)
{
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(4);
state.TagArray[3] = new("{OriginalFormat}", "M3{p0}{p1}{p2}");
state.TagArray[2] = new("p0", p0);
state.TagArray[1] = new("p1", p1 != null ? global::Microsoft.Extensions.Logging.LoggerMessageHelper.Stringify(p1) : null);
state.TagArray[0] = new("p2", p2);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Error,
new(3, nameof(M3)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p0 = s.TagArray[2].Value;
var p1 = s.TagArray[1].Value ?? "(null)";
var p2 = s.TagArray[0].Value;
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M3{p0}{p1}{p2}");
#else
return global::System.FormattableString.Invariant($"M3{p0}{p1}{p2}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M4{p0}{p1}{p2}{p3}" at "Error" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M4(global::Microsoft.Extensions.Logging.ILogger logger, int p0, global::System.Collections.Generic.IEnumerable<int> p1, int p2, int p3)
{
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(5);
state.TagArray[4] = new("{OriginalFormat}", "M4{p0}{p1}{p2}{p3}");
state.TagArray[3] = new("p0", p0);
state.TagArray[2] = new("p1", p1 != null ? global::Microsoft.Extensions.Logging.LoggerMessageHelper.Stringify(p1) : null);
state.TagArray[1] = new("p2", p2);
state.TagArray[0] = new("p3", p3);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Error,
new(4, nameof(M4)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p0 = s.TagArray[3].Value;
var p1 = s.TagArray[2].Value ?? "(null)";
var p2 = s.TagArray[1].Value;
var p3 = s.TagArray[0].Value;
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M4{p0}{p1}{p2}{p3}");
#else
return global::System.FormattableString.Invariant($"M4{p0}{p1}{p2}{p3}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M5{p0}{p1}{p2}{p3}{p4}" at "Error" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M5(global::Microsoft.Extensions.Logging.ILogger logger, int p0, global::System.Collections.Generic.IEnumerable<int> p1, int p2, int p3, int p4)
{
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(6);
state.TagArray[5] = new("{OriginalFormat}", "M5{p0}{p1}{p2}{p3}{p4}");
state.TagArray[4] = new("p0", p0);
state.TagArray[3] = new("p1", p1 != null ? global::Microsoft.Extensions.Logging.LoggerMessageHelper.Stringify(p1) : null);
state.TagArray[2] = new("p2", p2);
state.TagArray[1] = new("p3", p3);
state.TagArray[0] = new("p4", p4);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Error,
new(5, nameof(M5)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p0 = s.TagArray[4].Value;
var p1 = s.TagArray[3].Value ?? "(null)";
var p2 = s.TagArray[2].Value;
var p3 = s.TagArray[1].Value;
var p4 = s.TagArray[0].Value;
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M5{p0}{p1}{p2}{p3}{p4}");
#else
return global::System.FormattableString.Invariant($"M5{p0}{p1}{p2}{p3}{p4}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M6{p0}{p1}{p2}{p3}{p4}{p5}" at "Error" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M6(global::Microsoft.Extensions.Logging.ILogger logger, int p0, global::System.Collections.Generic.IEnumerable<int> p1, int p2, int p3, int p4, int p5)
{
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(7);
state.TagArray[6] = new("{OriginalFormat}", "M6{p0}{p1}{p2}{p3}{p4}{p5}");
state.TagArray[5] = new("p0", p0);
state.TagArray[4] = new("p1", p1 != null ? global::Microsoft.Extensions.Logging.LoggerMessageHelper.Stringify(p1) : null);
state.TagArray[3] = new("p2", p2);
state.TagArray[2] = new("p3", p3);
state.TagArray[1] = new("p4", p4);
state.TagArray[0] = new("p5", p5);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Error,
new(6, nameof(M6)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p0 = s.TagArray[5].Value;
var p1 = s.TagArray[4].Value ?? "(null)";
var p2 = s.TagArray[3].Value;
var p3 = s.TagArray[2].Value;
var p4 = s.TagArray[1].Value;
var p5 = s.TagArray[0].Value;
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M6{p0}{p1}{p2}{p3}{p4}{p5}");
#else
return global::System.FormattableString.Invariant($"M6{p0}{p1}{p2}{p3}{p4}{p5}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M7{p0}{p1}{p2}{p3}{p4}{p5}{p6}" at "Error" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M7(global::Microsoft.Extensions.Logging.ILogger logger, int p0, global::System.Collections.Generic.IEnumerable<int> p1, int p2, int p3, int p4, int p5, int p6)
{
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(8);
state.TagArray[7] = new("{OriginalFormat}", "M7{p0}{p1}{p2}{p3}{p4}{p5}{p6}");
state.TagArray[6] = new("p0", p0);
state.TagArray[5] = new("p1", p1 != null ? global::Microsoft.Extensions.Logging.LoggerMessageHelper.Stringify(p1) : null);
state.TagArray[4] = new("p2", p2);
state.TagArray[3] = new("p3", p3);
state.TagArray[2] = new("p4", p4);
state.TagArray[1] = new("p5", p5);
state.TagArray[0] = new("p6", p6);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Error,
new(7, nameof(M7)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p0 = s.TagArray[6].Value;
var p1 = s.TagArray[5].Value ?? "(null)";
var p2 = s.TagArray[4].Value;
var p3 = s.TagArray[3].Value;
var p4 = s.TagArray[2].Value;
var p5 = s.TagArray[1].Value;
var p6 = s.TagArray[0].Value;
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M7{p0}{p1}{p2}{p3}{p4}{p5}{p6}");
#else
return global::System.FormattableString.Invariant($"M7{p0}{p1}{p2}{p3}{p4}{p5}{p6}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M8{p0}{p1}{p2}{p3}{p4}{p5}{p6}{p7}" at "Error" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M8(global::Microsoft.Extensions.Logging.ILogger logger, int p0, global::System.Collections.Generic.IEnumerable<int> p1, int p2, int p3, int p4, int p5, int p6, int p7)
{
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(9);
state.TagArray[8] = new("{OriginalFormat}", "M8{p0}{p1}{p2}{p3}{p4}{p5}{p6}{p7}");
state.TagArray[7] = new("p0", p0);
state.TagArray[6] = new("p1", p1 != null ? global::Microsoft.Extensions.Logging.LoggerMessageHelper.Stringify(p1) : null);
state.TagArray[5] = new("p2", p2);
state.TagArray[4] = new("p3", p3);
state.TagArray[3] = new("p4", p4);
state.TagArray[2] = new("p5", p5);
state.TagArray[1] = new("p6", p6);
state.TagArray[0] = new("p7", p7);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Error,
new(8, nameof(M8)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p0 = s.TagArray[7].Value;
var p1 = s.TagArray[6].Value ?? "(null)";
var p2 = s.TagArray[5].Value;
var p3 = s.TagArray[4].Value;
var p4 = s.TagArray[3].Value;
var p5 = s.TagArray[2].Value;
var p6 = s.TagArray[1].Value;
var p7 = s.TagArray[0].Value;
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M8{p0}{p1}{p2}{p3}{p4}{p5}{p6}{p7}");
#else
return global::System.FormattableString.Invariant($"M8{p0}{p1}{p2}{p3}{p4}{p5}{p6}{p7}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M9{p0}{p1}{p2}{p3}{p4}{p5}{p6}{p7}{p8}" at "Error" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M9(global::Microsoft.Extensions.Logging.ILogger logger, int p0, global::System.Collections.Generic.IEnumerable<int> p1, int p2, int p3, int p4, int p5, int p6, int p7, int p8)
{
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(10);
state.TagArray[9] = new("{OriginalFormat}", "M9{p0}{p1}{p2}{p3}{p4}{p5}{p6}{p7}{p8}");
state.TagArray[8] = new("p0", p0);
state.TagArray[7] = new("p1", p1 != null ? global::Microsoft.Extensions.Logging.LoggerMessageHelper.Stringify(p1) : null);
state.TagArray[6] = new("p2", p2);
state.TagArray[5] = new("p3", p3);
state.TagArray[4] = new("p4", p4);
state.TagArray[3] = new("p5", p5);
state.TagArray[2] = new("p6", p6);
state.TagArray[1] = new("p7", p7);
state.TagArray[0] = new("p8", p8);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Error,
new(9, nameof(M9)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p0 = s.TagArray[8].Value;
var p1 = s.TagArray[7].Value ?? "(null)";
var p2 = s.TagArray[6].Value;
var p3 = s.TagArray[5].Value;
var p4 = s.TagArray[4].Value;
var p5 = s.TagArray[3].Value;
var p6 = s.TagArray[2].Value;
var p7 = s.TagArray[1].Value;
var p8 = s.TagArray[0].Value;
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M9{p0}{p1}{p2}{p3}{p4}{p5}{p6}{p7}{p8}");
#else
return global::System.FormattableString.Invariant($"M9{p0}{p1}{p2}{p3}{p4}{p5}{p6}{p7}{p8}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M10{p1}{p2}{p3}" at "Error" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M10(global::Microsoft.Extensions.Logging.ILogger logger, global::System.Collections.Generic.IEnumerable<int> p1, int[] p2, global::System.Collections.Generic.Dictionary<string, int> p3)
{
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(4);
state.TagArray[3] = new("{OriginalFormat}", "M10{p1}{p2}{p3}");
state.TagArray[2] = new("p1", p1 != null ? global::Microsoft.Extensions.Logging.LoggerMessageHelper.Stringify(p1) : null);
state.TagArray[1] = new("p2", p2 != null ? global::Microsoft.Extensions.Logging.LoggerMessageHelper.Stringify(p2) : null);
state.TagArray[0] = new("p3", p3 != null ? global::Microsoft.Extensions.Logging.LoggerMessageHelper.Stringify(p3) : null);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Error,
new(10, nameof(M10)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p1 = s.TagArray[2].Value ?? "(null)";
var p2 = s.TagArray[1].Value ?? "(null)";
var p3 = s.TagArray[0].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M10{p1}{p2}{p3}");
#else
return global::System.FormattableString.Invariant($"M10{p1}{p2}{p3}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M11{p1}" at "Error" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M11(global::Microsoft.Extensions.Logging.ILogger logger, global::System.Collections.Generic.IEnumerable<int>? p1)
{
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "M11{p1}");
state.TagArray[0] = new("p1", p1 != null ? global::Microsoft.Extensions.Logging.LoggerMessageHelper.Stringify(p1) : null);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Error,
new(11, nameof(M11)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p1 = s.TagArray[0].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M11{p1}");
#else
return global::System.FormattableString.Invariant($"M11{p1}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M12{class}" at "Error" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M12(global::Microsoft.Extensions.Logging.ILogger logger, global::System.Collections.Generic.IEnumerable<int>? @class)
{
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "M12{class}");
state.TagArray[0] = new("class", @class != null ? global::Microsoft.Extensions.Logging.LoggerMessageHelper.Stringify(@class) : null);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Error,
new(12, nameof(M12)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var @class = s.TagArray[0].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M12{@class}");
#else
return global::System.FormattableString.Invariant($"M12{@class}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M13{p1}" at "Error" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M13(global::Microsoft.Extensions.Logging.ILogger logger, global::TestClasses.StructEnumerable p1)
{
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "M13{p1}");
state.TagArray[0] = new("p1", global::Microsoft.Extensions.Logging.LoggerMessageHelper.Stringify(p1));
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Error,
new(13, nameof(M13)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p1 = s.TagArray[0].Value;
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M13{p1}");
#else
return global::System.FormattableString.Invariant($"M13{p1}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M14{p1}" at "Error" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M14(global::Microsoft.Extensions.Logging.ILogger logger, global::TestClasses.StructEnumerable? p1)
{
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "M14{p1}");
state.TagArray[0] = new("p1", p1 != null ? global::Microsoft.Extensions.Logging.LoggerMessageHelper.Stringify(p1) : null);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Error,
new(14, nameof(M14)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p1 = s.TagArray[0].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M14{p1}");
#else
return global::System.FormattableString.Invariant($"M14{p1}");
#endif
});
}
finally
{
state.Clear();
}
}
}
}
namespace TestClasses
{
partial class EventNameTestExtensions
{
/// <summary>
/// Logs "M0" at "Trace" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M0(global::Microsoft.Extensions.Logging.ILogger logger)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Trace))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("{OriginalFormat}", "M0");
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Trace,
new(0, "CustomEventName"),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return "M0";
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Emits a structured log entry.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M1(global::Microsoft.Extensions.Logging.LogLevel level, global::Microsoft.Extensions.Logging.ILogger logger, string p0)
{
if (!logger.IsEnabled(level))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("p0", p0);
logger.Log(
level,
new(459728468, "M1_Event"),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return string.Empty;
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Emits a structured log entry at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M1_Event(global::Microsoft.Extensions.Logging.ILogger logger, string p0)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("p0", p0);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(459728468, nameof(M1_Event)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return string.Empty;
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Emits a structured log entry at "Error" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M2(global::Microsoft.Extensions.Logging.ILogger logger, string p0)
{
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("p0", p0);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Error,
new(350193950, nameof(M2)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return string.Empty;
});
}
finally
{
state.Clear();
}
}
}
}
namespace TestClasses
{
partial class ExceptionTestExtensions
{
/// <summary>
/// Logs "M0 {ex2}" at "Trace" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M0(global::Microsoft.Extensions.Logging.ILogger logger, global::System.Exception ex1, global::System.Exception ex2)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Trace))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "M0 {ex2}");
state.TagArray[0] = new("ex2", ex2);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Trace,
new(0, nameof(M0)),
state,
ex1,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var ex2 = s.TagArray[0].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M0 {ex2}");
#else
return global::System.FormattableString.Invariant($"M0 {ex2}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M1 {ex2}" at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M1(global::System.Exception ex1, global::Microsoft.Extensions.Logging.ILogger logger, global::System.Exception ex2)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "M1 {ex2}");
state.TagArray[0] = new("ex2", ex2);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(1, nameof(M1)),
state,
ex1,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var ex2 = s.TagArray[0].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M1 {ex2}");
#else
return global::System.FormattableString.Invariant($"M1 {ex2}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M2 {arg1}: {ex}" at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M2(global::Microsoft.Extensions.Logging.ILogger logger, string arg1, global::System.Exception ex)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "M2 {arg1}: {ex}");
state.TagArray[0] = new("arg1", arg1);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(2, nameof(M2)),
state,
ex,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, ex) =>
{
var arg1 = s.TagArray[0].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M2 {arg1}: {ex}");
#else
return global::System.FormattableString.Invariant($"M2 {arg1}: {ex}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Emits a structured log entry.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M3(global::System.Exception ex, global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.Extensions.Logging.LogLevel level)
{
if (!logger.IsEnabled(level))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
logger.Log(
level,
new(366971569, nameof(M3)),
state,
ex,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return string.Empty;
});
}
finally
{
state.Clear();
}
}
}
}
namespace TestClasses
{
partial class FormattableTestExtensions
{
/// <summary>
/// Logs "Method1 {p1}" at "Error" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void Method1(global::Microsoft.Extensions.Logging.ILogger logger, global::TestClasses.FormattableTestExtensions.Formattable p1)
{
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "Method1 {p1}");
state.TagArray[0] = new("p1", p1.ToString(null, global::System.Globalization.CultureInfo.InvariantCulture));
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Error,
new(0, nameof(Method1)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p1 = s.TagArray[0].Value;
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"Method1 {p1}");
#else
return global::System.FormattableString.Invariant($"Method1 {p1}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "Method2" at "Error" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void Method2(global::Microsoft.Extensions.Logging.ILogger logger, global::TestClasses.FormattableTestExtensions.ComplexObj p1)
{
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(4);
state.TagArray[3] = new("{OriginalFormat}", "Method2");
state.TagArray[2] = new("p1.P1", p1?.P1.ToString(null, global::System.Globalization.CultureInfo.InvariantCulture));
state.TagArray[1] = new("p1.P2", p1?.P2.ToString(global::System.Globalization.CultureInfo.InvariantCulture));
state.TagArray[0] = new("p1.P3", p1?.P3);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Error,
new(1, nameof(Method2)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return "Method2";
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "Method3" at "Error" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void Method3(global::Microsoft.Extensions.Logging.ILogger logger, global::TestClasses.FormattableTestExtensions.Convertible p1)
{
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "Method3");
state.TagArray[0] = new("p1", p1.ToString(global::System.Globalization.CultureInfo.InvariantCulture));
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Error,
new(2, nameof(Method3)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return "Method3";
});
}
finally
{
state.Clear();
}
}
}
}
namespace TestClasses
{
partial class GenericLoggerInPropertyDerivedTestClass
{
/// <summary>
/// Logs "M1 {p0}" at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public partial void M1(string p0)
{
if (!Logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "M1 {p0}");
state.TagArray[0] = new("p0", p0);
Logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(1, nameof(M1)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p0 = s.TagArray[0].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M1 {p0}");
#else
return global::System.FormattableString.Invariant($"M1 {p0}");
#endif
});
}
finally
{
state.Clear();
}
}
}
}
namespace TestClasses
{
partial class GenericLoggerInPropertyTestClass
{
/// <summary>
/// Logs "M0 {p0}" at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public partial void M0(string p0)
{
if (!Logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "M0 {p0}");
state.TagArray[0] = new("p0", p0);
Logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(0, nameof(M0)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p0 = s.TagArray[0].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M0 {p0}");
#else
return global::System.FormattableString.Invariant($"M0 {p0}");
#endif
});
}
finally
{
state.Clear();
}
}
}
}
namespace TestClasses
{
partial class GenericTestExtensions
{
/// <summary>
/// Logs "M1 {value}" at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
internal static partial void M1<T>(global::Microsoft.Extensions.Logging.ILogger logger, T value)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "M1 {value}");
state.TagArray[0] = new("value", value);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(0, nameof(M1)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var value = s.TagArray[0].Value;
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M1 {value}");
#else
return global::System.FormattableString.Invariant($"M1 {value}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M2 {code}" at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
internal static partial void M2<TCode>(global::Microsoft.Extensions.Logging.ILogger logger, TCode code)
where TCode : struct, global::System.Enum
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "M2 {code}");
state.TagArray[0] = new("code", code);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(1, nameof(M2)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var code = s.TagArray[0].Value;
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M2 {code}");
#else
return global::System.FormattableString.Invariant($"M2 {code}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M3 {p1} {p2}" at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
internal static partial void M3<T1, T2>(global::Microsoft.Extensions.Logging.ILogger logger, T1 p1, T2 p2)
where T1 : class
where T2 : notnull
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(3);
state.TagArray[2] = new("{OriginalFormat}", "M3 {p1} {p2}");
state.TagArray[1] = new("p1", p1);
state.TagArray[0] = new("p2", p2);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(2, nameof(M3)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p1 = s.TagArray[1].Value ?? "(null)";
var p2 = s.TagArray[0].Value;
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M3 {p1} {p2}");
#else
return global::System.FormattableString.Invariant($"M3 {p1} {p2}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M4 {value}" at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
internal static partial void M4<T>(global::Microsoft.Extensions.Logging.ILogger logger, T value)
where T : new()
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "M4 {value}");
state.TagArray[0] = new("value", value);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(3, nameof(M4)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var value = s.TagArray[0].Value;
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M4 {value}");
#else
return global::System.FormattableString.Invariant($"M4 {value}");
#endif
});
}
finally
{
state.Clear();
}
}
}
}
namespace TestClasses
{
partial class InParameterTestExtensions
{
/// <summary>
/// Logs "M0 {s}" at "Information" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
internal static partial void M0(global::Microsoft.Extensions.Logging.ILogger logger, in global::TestClasses.InParameterTestExtensions.S s)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Information))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "M0 {s}");
state.TagArray[0] = new("s", s.ToString());
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Information,
new(0, nameof(M0)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s_, _) =>
{
var s = s_.TagArray[0].Value;
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M0 {s}");
#else
return global::System.FormattableString.Invariant($"M0 {s}");
#endif
});
}
finally
{
state.Clear();
}
}
}
}
namespace TestClasses
{
partial class InvariantTestExtensions
{
/// <summary>
/// Logs "M0 {p0}" at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M0(global::Microsoft.Extensions.Logging.ILogger logger, global::System.DateTime p0)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "M0 {p0}");
state.TagArray[0] = new("p0", p0.ToString(global::System.Globalization.CultureInfo.InvariantCulture));
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(0, nameof(M0)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p0 = s.TagArray[0].Value;
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M0 {p0}");
#else
return global::System.FormattableString.Invariant($"M0 {p0}");
#endif
});
}
finally
{
state.Clear();
}
}
}
}
namespace TestClasses
{
partial class LevelTestExtensions
{
/// <summary>
/// Logs "M0" at "Trace" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M0(global::Microsoft.Extensions.Logging.ILogger logger)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Trace))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("{OriginalFormat}", "M0");
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Trace,
new(0, nameof(M0)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return "M0";
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M1" at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M1(global::Microsoft.Extensions.Logging.ILogger logger)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("{OriginalFormat}", "M1");
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(1, nameof(M1)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return "M1";
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M2" at "Information" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M2(global::Microsoft.Extensions.Logging.ILogger logger)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Information))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("{OriginalFormat}", "M2");
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Information,
new(2, nameof(M2)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return "M2";
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M3" at "Warning" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M3(global::Microsoft.Extensions.Logging.ILogger logger)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Warning))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("{OriginalFormat}", "M3");
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Warning,
new(3, nameof(M3)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return "M3";
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M4" at "Error" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M4(global::Microsoft.Extensions.Logging.ILogger logger)
{
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("{OriginalFormat}", "M4");
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Error,
new(4, nameof(M4)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return "M4";
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M5" at "Critical" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M5(global::Microsoft.Extensions.Logging.ILogger logger)
{
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("{OriginalFormat}", "M5");
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Critical,
new(5, nameof(M5)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return "M5";
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M6" at "None" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M6(global::Microsoft.Extensions.Logging.ILogger logger)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.None))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("{OriginalFormat}", "M6");
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.None,
new(6, nameof(M6)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return "M6";
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M7" at "42" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M7(global::Microsoft.Extensions.Logging.ILogger logger)
{
if (!logger.IsEnabled((global::Microsoft.Extensions.Logging.LogLevel)42))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("{OriginalFormat}", "M7");
logger.Log(
(global::Microsoft.Extensions.Logging.LogLevel)42,
new(7, nameof(M7)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return "M7";
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M8".
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M8(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.Extensions.Logging.LogLevel level)
{
if (!logger.IsEnabled(level))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("{OriginalFormat}", "M8");
logger.Log(
level,
new(182417760, nameof(M8)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return "M8";
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M9".
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M9(global::Microsoft.Extensions.Logging.LogLevel level, global::Microsoft.Extensions.Logging.ILogger logger)
{
if (!logger.IsEnabled(level))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("{OriginalFormat}", "M9");
logger.Log(
level,
new(199195379, nameof(M9)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return "M9";
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M10 {level}".
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M10(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.Extensions.Logging.LogLevel level)
{
if (!logger.IsEnabled(level))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "M10 {level}");
state.TagArray[0] = new("level", level.ToString());
logger.Log(
level,
new(65186657, nameof(M10)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var level = s.TagArray[0].Value;
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M10 {level}");
#else
return global::System.FormattableString.Invariant($"M10 {level}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M11 {logger}".
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M11(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.Extensions.Logging.LogLevel level)
{
if (!logger.IsEnabled(level))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "M11 {logger}");
state.TagArray[0] = new("logger", logger);
logger.Log(
level,
new(48409038, nameof(M11)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var logger = s.TagArray[0].Value;
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M11 {logger}");
#else
return global::System.FormattableString.Invariant($"M11 {logger}");
#endif
});
}
finally
{
state.Clear();
}
}
}
}
namespace TestClasses
{
partial struct NestedStruct
{
partial class Logger
{
/// <summary>
/// Logs "M10" at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M10(global::Microsoft.Extensions.Logging.ILogger logger)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("{OriginalFormat}", "M10");
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(10, nameof(M10)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return "M10";
});
}
finally
{
state.Clear();
}
}
}
}
}
namespace TestClasses
{
partial record NestedRecord
{
partial class Logger
{
/// <summary>
/// Logs "M11" at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M11(global::Microsoft.Extensions.Logging.ILogger logger)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("{OriginalFormat}", "M11");
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(11, nameof(M11)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return "M11";
});
}
finally
{
state.Clear();
}
}
}
}
}
namespace TestClasses
{
partial class MultiLevelNestedClass
{
partial struct NestedStruct
{
partial record NestedRecord
{
partial class Logger
{
/// <summary>
/// Logs "M12" at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M12(global::Microsoft.Extensions.Logging.ILogger logger)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("{OriginalFormat}", "M12");
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(12, nameof(M12)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return "M12";
});
}
finally
{
state.Clear();
}
}
}
}
}
}
}
namespace TestClasses
{
partial class LoggerInNullablePropertyDerivedTestClass
{
/// <summary>
/// Logs "M1 {p0}" at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public partial void M1(string p0)
{
if (Logger == null)
{
return;
}
if (!Logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "M1 {p0}");
state.TagArray[0] = new("p0", p0);
Logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(1, nameof(M1)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p0 = s.TagArray[0].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M1 {p0}");
#else
return global::System.FormattableString.Invariant($"M1 {p0}");
#endif
});
}
finally
{
state.Clear();
}
}
}
}
namespace TestClasses
{
partial class LoggerInNullablePropertyTestClass
{
/// <summary>
/// Logs "M0 {p0}" at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public partial void M0(string p0)
{
if (Logger == null)
{
return;
}
if (!Logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "M0 {p0}");
state.TagArray[0] = new("p0", p0);
Logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(0, nameof(M0)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p0 = s.TagArray[0].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M0 {p0}");
#else
return global::System.FormattableString.Invariant($"M0 {p0}");
#endif
});
}
finally
{
state.Clear();
}
}
}
}
namespace TestClasses
{
partial class LoggerInPropertyDerivedTestClass
{
/// <summary>
/// Logs "M1 {p0}" at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public partial void M1(string p0)
{
if (!Logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "M1 {p0}");
state.TagArray[0] = new("p0", p0);
Logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(1, nameof(M1)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p0 = s.TagArray[0].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M1 {p0}");
#else
return global::System.FormattableString.Invariant($"M1 {p0}");
#endif
});
}
finally
{
state.Clear();
}
}
}
}
namespace TestClasses
{
partial class LoggerInPropertyTestClass
{
/// <summary>
/// Logs "M0 {p0}" at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public partial void M0(string p0)
{
if (!Logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "M0 {p0}");
state.TagArray[0] = new("p0", p0);
Logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(0, nameof(M0)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p0 = s.TagArray[0].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M0 {p0}");
#else
return global::System.FormattableString.Invariant($"M0 {p0}");
#endif
});
}
finally
{
state.Clear();
}
}
}
}
namespace TestClasses
{
partial class LoggerInProtectedFieldDerivedTestClass
{
/// <summary>
/// Logs "M1 {p0}" at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public partial void M1(string p0)
{
if (!Logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "M1 {p0}");
state.TagArray[0] = new("p0", p0);
Logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(1, nameof(M1)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p0 = s.TagArray[0].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M1 {p0}");
#else
return global::System.FormattableString.Invariant($"M1 {p0}");
#endif
});
}
finally
{
state.Clear();
}
}
}
}
namespace TestClasses
{
partial class LoggerInProtectedFieldTestClass
{
/// <summary>
/// Logs "M0 {p0}" at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public partial void M0(string p0)
{
if (!Logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "M0 {p0}");
state.TagArray[0] = new("p0", p0);
Logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(1, nameof(M0)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p0 = s.TagArray[0].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M0 {p0}");
#else
return global::System.FormattableString.Invariant($"M0 {p0}");
#endif
});
}
finally
{
state.Clear();
}
}
}
}
namespace TestClasses
{
partial class LogPropertiesExtensions
{
/// <summary>
/// Logs "Only {classToLog_StringProperty_1} as param" at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void LogFunc(global::Microsoft.Extensions.Logging.ILogger logger, string classToLog_StringProperty_1, global::TestClasses.LogPropertiesExtensions.MyDerivedClass classToLog)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(33);
state.TagArray[32] = new("{OriginalFormat}", "Only {classToLog_StringProperty_1} as param");
state.TagArray[31] = new("classToLog_StringProperty_1", classToLog_StringProperty_1);
state.TagArray[30] = new("classToLog.StringProperty", classToLog?.StringProperty);
state.TagArray[29] = new("classToLog.SimplifiedNullableIntProperty", classToLog?.SimplifiedNullableIntProperty);
state.TagArray[28] = new("classToLog.ExplicitNullableIntProperty", classToLog?.ExplicitNullableIntProperty);
state.TagArray[27] = new("classToLog.GetOnlyProperty", classToLog?.GetOnlyProperty.ToString(global::System.Globalization.CultureInfo.InvariantCulture));
state.TagArray[26] = new("classToLog.VirtualPropertyBase", classToLog?.VirtualPropertyBase);
state.TagArray[25] = new("classToLog.VirtualInterimProperty", classToLog?.VirtualInterimProperty);
state.TagArray[24] = new("classToLog.TransitivePropertyArray", global::Microsoft.Extensions.Logging.LoggerMessageHelper.Stringify(classToLog?.TransitivePropertyArray));
state.TagArray[23] = new("classToLog.TransitiveProperty.TransitiveVirtualProp", classToLog?.TransitiveProperty?.TransitiveVirtualProp);
state.TagArray[22] = new("classToLog.TransitiveProperty.TransitiveDerivedProp", classToLog?.TransitiveProperty?.TransitiveDerivedProp);
state.TagArray[21] = new("classToLog.TransitiveProperty.TransitiveNumberProp", classToLog?.TransitiveProperty?.TransitiveNumberProp);
state.TagArray[20] = new("classToLog.TransitiveProperty.TransitiveStringProp", classToLog?.TransitiveProperty?.TransitiveStringProp);
state.TagArray[19] = new("classToLog.TransitiveProperty.TransitiveGenericProp.GenericProp", classToLog?.TransitiveProperty?.TransitiveGenericProp?.GenericProp);
state.TagArray[18] = new("classToLog.TransitiveProperty.InnerTransitiveProperty.DateTimeProperty", classToLog?.TransitiveProperty?.InnerTransitiveProperty?.DateTimeProperty.ToString(global::System.Globalization.CultureInfo.InvariantCulture));
state.TagArray[17] = new("classToLog.TransitiveProperty.InnerTransitiveProperty.IntegerProperty", classToLog?.TransitiveProperty?.InnerTransitiveProperty?.IntegerProperty);
state.TagArray[16] = new("classToLog.AnotherTransitiveProperty.IntegerProperty", classToLog?.AnotherTransitiveProperty?.IntegerProperty);
state.TagArray[15] = new("classToLog.PropertyOfGenerics.GenericProp", classToLog?.PropertyOfGenerics?.GenericProp);
state.TagArray[14] = new("classToLog.CustomStructProperty.LongProperty", classToLog?.CustomStructProperty.LongProperty);
state.TagArray[13] = new("classToLog.CustomStructProperty.TransitiveStructProperty.DateTimeOffsetProperty", classToLog?.CustomStructProperty.TransitiveStructProperty.DateTimeOffsetProperty.ToString(global::System.Globalization.CultureInfo.InvariantCulture));
state.TagArray[12] = new("classToLog.CustomStructProperty.NullableTransitiveStructProperty.DateTimeOffsetProperty", classToLog?.CustomStructProperty.NullableTransitiveStructProperty?.DateTimeOffsetProperty.ToString(global::System.Globalization.CultureInfo.InvariantCulture));
state.TagArray[11] = new("classToLog.CustomStructProperty.NullableTransitiveStructProperty2.DateTimeOffsetProperty", classToLog?.CustomStructProperty.NullableTransitiveStructProperty2?.DateTimeOffsetProperty.ToString(global::System.Globalization.CultureInfo.InvariantCulture));
state.TagArray[10] = new("classToLog.CustomStructNullableProperty.LongProperty", classToLog?.CustomStructNullableProperty?.LongProperty);
state.TagArray[9] = new("classToLog.CustomStructNullableProperty.TransitiveStructProperty.DateTimeOffsetProperty", classToLog?.CustomStructNullableProperty?.TransitiveStructProperty.DateTimeOffsetProperty.ToString(global::System.Globalization.CultureInfo.InvariantCulture));
state.TagArray[8] = new("classToLog.CustomStructNullableProperty.NullableTransitiveStructProperty.DateTimeOffsetProperty", classToLog?.CustomStructNullableProperty?.NullableTransitiveStructProperty?.DateTimeOffsetProperty.ToString(global::System.Globalization.CultureInfo.InvariantCulture));
state.TagArray[7] = new("classToLog.CustomStructNullableProperty.NullableTransitiveStructProperty2.DateTimeOffsetProperty", classToLog?.CustomStructNullableProperty?.NullableTransitiveStructProperty2?.DateTimeOffsetProperty.ToString(global::System.Globalization.CultureInfo.InvariantCulture));
state.TagArray[6] = new("classToLog.CustomStructNullableProperty2.LongProperty", classToLog?.CustomStructNullableProperty2?.LongProperty);
state.TagArray[5] = new("classToLog.CustomStructNullableProperty2.TransitiveStructProperty.DateTimeOffsetProperty", classToLog?.CustomStructNullableProperty2?.TransitiveStructProperty.DateTimeOffsetProperty.ToString(global::System.Globalization.CultureInfo.InvariantCulture));
state.TagArray[4] = new("classToLog.CustomStructNullableProperty2.NullableTransitiveStructProperty.DateTimeOffsetProperty", classToLog?.CustomStructNullableProperty2?.NullableTransitiveStructProperty?.DateTimeOffsetProperty.ToString(global::System.Globalization.CultureInfo.InvariantCulture));
state.TagArray[3] = new("classToLog.CustomStructNullableProperty2.NullableTransitiveStructProperty2.DateTimeOffsetProperty", classToLog?.CustomStructNullableProperty2?.NullableTransitiveStructProperty2?.DateTimeOffsetProperty.ToString(global::System.Globalization.CultureInfo.InvariantCulture));
state.TagArray[2] = new("classToLog.InterimProperty", classToLog?.InterimProperty);
state.TagArray[1] = new("classToLog.NonVirtualPropertyBase", classToLog?.NonVirtualPropertyBase);
state.TagArray[0] = new("classToLog.StringPropertyBase", classToLog?.StringPropertyBase);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(0, nameof(LogFunc)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var classToLog_StringProperty_1 = s.TagArray[31].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"Only {classToLog_StringProperty_1} as param");
#else
return global::System.FormattableString.Invariant($"Only {classToLog_StringProperty_1} as param");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "Both {StringProperty} and {ComplexParam} as params" at "Information" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void LogMethodTwoParams(global::Microsoft.Extensions.Logging.ILogger logger, string StringProperty, global::TestClasses.LogPropertiesExtensions.ClassAsParam? complexParam)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Information))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(4);
state.TagArray[3] = new("{OriginalFormat}", "Both {StringProperty} and {ComplexParam} as params");
state.TagArray[2] = new("StringProperty", StringProperty);
state.TagArray[1] = new("ComplexParam", complexParam);
state.TagArray[0] = new("complexParam.MyProperty", complexParam?.MyProperty);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Information,
new(1, nameof(LogMethodTwoParams)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var StringProperty = s.TagArray[2].Value ?? "(null)";
var complexParam = s.TagArray[1].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"Both {StringProperty} and {complexParam} as params");
#else
return global::System.FormattableString.Invariant($"Both {StringProperty} and {complexParam} as params");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "Testing non-nullable struct here..." at "Information" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void LogMethodStruct(global::Microsoft.Extensions.Logging.ILogger logger, global::TestClasses.LogPropertiesExtensions.MyCustomStruct structParam)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Information))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(5);
state.TagArray[4] = new("{OriginalFormat}", "Testing non-nullable struct here...");
state.TagArray[3] = new("structParam.LongProperty", structParam.LongProperty);
state.TagArray[2] = new("structParam.TransitiveStructProperty.DateTimeOffsetProperty", structParam.TransitiveStructProperty.DateTimeOffsetProperty.ToString(global::System.Globalization.CultureInfo.InvariantCulture));
state.TagArray[1] = new("structParam.NullableTransitiveStructProperty.DateTimeOffsetProperty", structParam.NullableTransitiveStructProperty?.DateTimeOffsetProperty.ToString(global::System.Globalization.CultureInfo.InvariantCulture));
state.TagArray[0] = new("structParam.NullableTransitiveStructProperty2.DateTimeOffsetProperty", structParam.NullableTransitiveStructProperty2?.DateTimeOffsetProperty.ToString(global::System.Globalization.CultureInfo.InvariantCulture));
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Information,
new(2, nameof(LogMethodStruct)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return "Testing non-nullable struct here...";
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "Testing nullable struct here..." at "Information" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void LogMethodNullableStruct(global::Microsoft.Extensions.Logging.ILogger logger, in global::TestClasses.LogPropertiesExtensions.MyCustomStruct? structParam)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Information))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(5);
state.TagArray[4] = new("{OriginalFormat}", "Testing nullable struct here...");
state.TagArray[3] = new("structParam.LongProperty", structParam?.LongProperty);
state.TagArray[2] = new("structParam.TransitiveStructProperty.DateTimeOffsetProperty", structParam?.TransitiveStructProperty.DateTimeOffsetProperty.ToString(global::System.Globalization.CultureInfo.InvariantCulture));
state.TagArray[1] = new("structParam.NullableTransitiveStructProperty.DateTimeOffsetProperty", structParam?.NullableTransitiveStructProperty?.DateTimeOffsetProperty.ToString(global::System.Globalization.CultureInfo.InvariantCulture));
state.TagArray[0] = new("structParam.NullableTransitiveStructProperty2.DateTimeOffsetProperty", structParam?.NullableTransitiveStructProperty2?.DateTimeOffsetProperty.ToString(global::System.Globalization.CultureInfo.InvariantCulture));
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Information,
new(3, nameof(LogMethodNullableStruct)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return "Testing nullable struct here...";
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "Testing explicit nullable struct here..." at "Information" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void LogMethodExplicitNullableStruct(global::Microsoft.Extensions.Logging.ILogger logger, global::TestClasses.LogPropertiesExtensions.MyCustomStruct? structParam)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Information))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(5);
state.TagArray[4] = new("{OriginalFormat}", "Testing explicit nullable struct here...");
state.TagArray[3] = new("structParam.LongProperty", structParam?.LongProperty);
state.TagArray[2] = new("structParam.TransitiveStructProperty.DateTimeOffsetProperty", structParam?.TransitiveStructProperty.DateTimeOffsetProperty.ToString(global::System.Globalization.CultureInfo.InvariantCulture));
state.TagArray[1] = new("structParam.NullableTransitiveStructProperty.DateTimeOffsetProperty", structParam?.NullableTransitiveStructProperty?.DateTimeOffsetProperty.ToString(global::System.Globalization.CultureInfo.InvariantCulture));
state.TagArray[0] = new("structParam.NullableTransitiveStructProperty2.DateTimeOffsetProperty", structParam?.NullableTransitiveStructProperty2?.DateTimeOffsetProperty.ToString(global::System.Globalization.CultureInfo.InvariantCulture));
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Information,
new(4, nameof(LogMethodExplicitNullableStruct)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return "Testing explicit nullable struct here...";
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "Testing nullable property within class here..." at "Information" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void LogMethodNullablePropertyInClassMatchesNonNullable(global::Microsoft.Extensions.Logging.ILogger logger, global::TestClasses.LogPropertiesExtensions.MyClassWithNullableProperty classWithNullablePropertyParam)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Information))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(3);
state.TagArray[2] = new("{OriginalFormat}", "Testing nullable property within class here...");
state.TagArray[1] = new("classWithNullablePropertyParam.NullableDateTime", classWithNullablePropertyParam?.NullableDateTime?.ToString(global::System.Globalization.CultureInfo.InvariantCulture));
state.TagArray[0] = new("classWithNullablePropertyParam.NonNullableDateTime", classWithNullablePropertyParam?.NonNullableDateTime.ToString(global::System.Globalization.CultureInfo.InvariantCulture));
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Information,
new(5, nameof(LogMethodNullablePropertyInClassMatchesNonNullable)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return "Testing nullable property within class here...";
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Emits a structured log entry.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void LogMethodDefaultAttrCtor(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.Extensions.Logging.LogLevel level, global::TestClasses.LogPropertiesExtensions.ClassAsParam? complexParam)
{
if (!logger.IsEnabled(level))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("complexParam.MyProperty", complexParam?.MyProperty);
logger.Log(
level,
new(1097310008, nameof(LogMethodDefaultAttrCtor)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return string.Empty;
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "Testing interface-typed argument here..." at "Information" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void LogMethodInterfaceArg(global::Microsoft.Extensions.Logging.ILogger logger, global::TestClasses.LogPropertiesExtensions.IMyInterface complexParam)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Information))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(3);
state.TagArray[2] = new("{OriginalFormat}", "Testing interface-typed argument here...");
state.TagArray[1] = new("complexParam.IntProperty", complexParam?.IntProperty);
state.TagArray[0] = new("complexParam.TransitiveProp.IntegerProperty", complexParam?.TransitiveProp?.IntegerProperty);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Information,
new(6, nameof(LogMethodInterfaceArg)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return "Testing interface-typed argument here...";
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "Testing logging a complex object residing in another assembly..." at "Information" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void LogObjectFromAnotherAssembly(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.Gen.Logging.Test.ObjectToLog logObject)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Information))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(4);
state.TagArray[3] = new("{OriginalFormat}", "Testing logging a complex object residing in another assembly...");
state.TagArray[2] = new("logObject.PropertyToLog", logObject?.PropertyToLog);
state.TagArray[1] = new("logObject.FieldToLog.Name", logObject?.FieldToLog?.Name);
state.TagArray[0] = new("logObject.FieldToLog.Value", logObject?.FieldToLog?.Value);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Information,
new(7, nameof(LogObjectFromAnotherAssembly)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return "Testing logging a complex object residing in another assembly...";
});
}
finally
{
state.Clear();
}
}
}
}
namespace TestClasses
{
partial class LogPropertiesNullHandlingExtensions
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
private static readonly global::Microsoft.Extensions.Compliance.Classification.DataClassification _Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute = new global::Microsoft.Extensions.Compliance.Testing.PrivateDataAttribute().Classification;
/// <summary>
/// Emits a structured log entry at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M0(global::Microsoft.Extensions.Logging.ILogger logger, global::TestClasses.LogPropertiesNullHandlingExtensions.MyProps p)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(6);
state.TagArray[5] = new("p.P0", p?.P0);
state.TagArray[4] = new("p.P1", p?.P1);
state.TagArray[3] = new("p.P2", p?.P2);
state.TagArray[2] = new("p.P3", p?.P3);
state.TagArray[1] = new("p.P4", p?.P4.ToString());
state.TagArray[0] = new("p.P10", global::Microsoft.Extensions.Logging.LoggerMessageHelper.Stringify(p?.P10));
_ = state.ReserveClassifiedTagSpace(5);
state.ClassifiedTagArray[4] = new("p.P5", p?.P5, new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute));
state.ClassifiedTagArray[3] = new("p.P6", p?.P6, new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute));
state.ClassifiedTagArray[2] = new("p.P7", p?.P7, new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute));
state.ClassifiedTagArray[1] = new("p.P8", p?.P8, new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute));
state.ClassifiedTagArray[0] = new("p.P9", p?.P9.ToString(), new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute));
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(316638712, nameof(M0)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return string.Empty;
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Emits a structured log entry at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M1(global::Microsoft.Extensions.Logging.ILogger logger, global::TestClasses.LogPropertiesNullHandlingExtensions.MyProps p)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
{
var tmp = p?.P0;
if (tmp != null)
{
state.AddTag("p.P0", tmp);
}
}
{
var tmp = p?.P1;
if (tmp != null)
{
state.AddTag("p.P1", tmp);
}
}
state.AddTag("p.P2", p?.P2);
{
var tmp = p?.P3;
if (tmp != null)
{
state.AddTag("p.P3", tmp);
}
}
state.AddTag("p.P4", p?.P4.ToString());
{
var tmp = p?.P5;
if (tmp != null)
{
state.AddClassifiedTag("p.P5", tmp, new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute));
}
}
{
var tmp = p?.P6;
if (tmp != null)
{
state.AddClassifiedTag("p.P6", tmp, new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute));
}
}
state.AddClassifiedTag("p.P7", p?.P7, new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute));
{
var tmp = p?.P8;
if (tmp != null)
{
state.AddClassifiedTag("p.P8", tmp, new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute));
}
}
state.AddClassifiedTag("p.P9", p?.P9.ToString(), new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute));
{
if (p?.P10 != null)
{
state.AddTag("p.P10", global::Microsoft.Extensions.Logging.LoggerMessageHelper.Stringify(p?.P10));
}
}
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(333416331, nameof(M1)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return string.Empty;
});
}
finally
{
state.Clear();
}
}
}
}
namespace TestClasses
{
partial class LogPropertiesOmitParameterNameExtensions
{
/// <summary>
/// Emits a structured log entry at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M0(global::Microsoft.Extensions.Logging.ILogger logger, global::TestClasses.LogPropertiesOmitParameterNameExtensions.MyProps p)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("P0", p?.P0);
state.TagArray[0] = new("P1", p?.P1);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(316638712, nameof(M0)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return string.Empty;
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Emits a structured log entry at "Warning" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M1(global::Microsoft.Extensions.Logging.ILogger logger, global::TestClasses.LogPropertiesOmitParameterNameExtensions.MyProps p)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Warning))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
state.TagNamePrefix = string.Empty;
global::TestClasses.LogPropertiesOmitParameterNameExtensions.MyPropsProvider.ProvideProperties(state, p);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Warning,
new(333416331, nameof(M1)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return string.Empty;
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Emits a structured log entry.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
internal static partial void M2(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.Extensions.Logging.LogLevel level, global::TestClasses.LogPropertiesOmitParameterNameExtensions.MyProps param)
{
if (!logger.IsEnabled(level))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("P0", param?.P0);
state.TagArray[0] = new("P1", param?.P1);
logger.Log(
level,
new(350193950, nameof(M2)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return string.Empty;
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Emits a structured log entry.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
internal static partial void M3(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.Extensions.Logging.LogLevel level, global::TestClasses.LogPropertiesOmitParameterNameExtensions.MyProps p)
{
if (!logger.IsEnabled(level))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
state.TagNamePrefix = string.Empty;
global::TestClasses.LogPropertiesOmitParameterNameExtensions.MyPropsProvider.ProvideProperties(state, p);
logger.Log(
level,
new(366971569, nameof(M3)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return string.Empty;
});
}
finally
{
state.Clear();
}
}
}
}
namespace TestClasses
{
partial class LogPropertiesRecordExtensions
{
/// <summary>
/// Emits a structured log entry at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void LogRecordClass(global::Microsoft.Extensions.Logging.ILogger logger, global::TestClasses.LogPropertiesRecordExtensions.MyRecordClass p0)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(4);
state.TagArray[3] = new("p0.Value", p0?.Value);
state.TagArray[2] = new("p0.class", p0?.@class);
state.TagArray[1] = new("p0.GetOnlyValue", p0?.GetOnlyValue);
state.TagArray[0] = new("p0.event", p0?.@event);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(89559768, nameof(LogRecordClass)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return string.Empty;
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "Struct is: {p0}" at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void LogRecordStruct(global::Microsoft.Extensions.Logging.ILogger logger, global::TestClasses.LogPropertiesRecordExtensions.MyRecordStruct p0)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(5);
state.TagArray[4] = new("{OriginalFormat}", "Struct is: {p0}");
state.TagArray[3] = new("p0", p0.ToString());
state.TagArray[2] = new("p0.IntValue", p0.IntValue);
state.TagArray[1] = new("p0.StringValue", p0.StringValue);
state.TagArray[0] = new("p0.GetOnlyValue", p0.GetOnlyValue);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(774093065, nameof(LogRecordStruct)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p0 = s.TagArray[3].Value;
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"Struct is: {p0}");
#else
return global::System.FormattableString.Invariant($"Struct is: {p0}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "Readonly struct is: {p0}" at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void LogReadonlyRecordStruct(global::Microsoft.Extensions.Logging.ILogger logger, global::TestClasses.LogPropertiesRecordExtensions.MyReadonlyRecordStruct p0)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(5);
state.TagArray[4] = new("{OriginalFormat}", "Readonly struct is: {p0}");
state.TagArray[3] = new("p0", p0.ToString());
state.TagArray[2] = new("p0.IntValue", p0.IntValue);
state.TagArray[1] = new("p0.StringValue", p0.StringValue);
state.TagArray[0] = new("p0.GetOnlyValue", p0.GetOnlyValue);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(57864111, nameof(LogReadonlyRecordStruct)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p0 = s.TagArray[3].Value;
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"Readonly struct is: {p0}");
#else
return global::System.FormattableString.Invariant($"Readonly struct is: {p0}");
#endif
});
}
finally
{
state.Clear();
}
}
}
}
namespace TestClasses
{
partial class LogPropertiesRedactionExtensions
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
private static readonly global::Microsoft.Extensions.Compliance.Classification.DataClassification _Microsoft_Extensions_Compliance_Testing_PublicDataAttribute = new global::Microsoft.Extensions.Compliance.Testing.PublicDataAttribute().Classification;
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
private static readonly global::Microsoft.Extensions.Compliance.Classification.DataClassification _Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute = new global::Microsoft.Extensions.Compliance.Testing.PrivateDataAttribute().Classification;
/// <summary>
/// Logs "No template params" at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void LogNoParams(global::Microsoft.Extensions.Logging.ILogger logger, global::TestClasses.LogPropertiesRedactionExtensions.ClassToRedact classToLog)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(4);
state.TagArray[3] = new("{OriginalFormat}", "No template params");
state.TagArray[2] = new("classToLog.SimplifiedNullableIntProperty", classToLog?.SimplifiedNullableIntProperty);
state.TagArray[1] = new("classToLog.TransitiveProp.TransitiveNumberProp", classToLog?.TransitiveProp?.TransitiveNumberProp);
state.TagArray[0] = new("classToLog.NoRedactionProp", classToLog?.NoRedactionProp);
_ = state.ReserveClassifiedTagSpace(5);
state.ClassifiedTagArray[4] = new("classToLog.StringProperty", classToLog?.StringProperty, new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PublicDataAttribute));
state.ClassifiedTagArray[3] = new("classToLog.GetOnlyProperty", classToLog?.GetOnlyProperty, new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute));
state.ClassifiedTagArray[2] = new("classToLog.NonFormattableProperty", classToLog?.NonFormattableProperty.ToString(), new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute));
state.ClassifiedTagArray[1] = new("classToLog.TransitiveProp.TransitiveStringProp", classToLog?.TransitiveProp?.TransitiveStringProp, new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute));
state.ClassifiedTagArray[0] = new("classToLog.StringPropertyBase", classToLog?.StringPropertyBase, new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute));
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(1, nameof(LogNoParams)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return "No template params";
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "Only {StringProperty} as param" at "Information" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void LogTwoParams(global::Microsoft.Extensions.Logging.ILogger logger, string stringProperty, global::TestClasses.LogPropertiesRedactionExtensions.MyTransitiveClass? complexParam)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Information))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "Only {StringProperty} as param");
state.TagArray[0] = new("complexParam.TransitiveNumberProp", complexParam?.TransitiveNumberProp);
_ = state.ReserveClassifiedTagSpace(2);
state.ClassifiedTagArray[1] = new("StringProperty", stringProperty, new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute));
state.ClassifiedTagArray[0] = new("complexParam.TransitiveStringProp", complexParam?.TransitiveStringProp, new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute));
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Information,
new(2, nameof(LogTwoParams)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var stringProperty = s.RedactedTagArray[1].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"Only {stringProperty} as param");
#else
return global::System.FormattableString.Invariant($"Only {stringProperty} as param");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Emits a structured log entry.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void LogNoParamsDefaultCtor(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.Extensions.Logging.LogLevel level, global::TestClasses.LogPropertiesRedactionExtensions.ClassToRedact classToLog)
{
if (!logger.IsEnabled(level))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(3);
state.TagArray[2] = new("classToLog.SimplifiedNullableIntProperty", classToLog?.SimplifiedNullableIntProperty);
state.TagArray[1] = new("classToLog.TransitiveProp.TransitiveNumberProp", classToLog?.TransitiveProp?.TransitiveNumberProp);
state.TagArray[0] = new("classToLog.NoRedactionProp", classToLog?.NoRedactionProp);
_ = state.ReserveClassifiedTagSpace(5);
state.ClassifiedTagArray[4] = new("classToLog.StringProperty", classToLog?.StringProperty, new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PublicDataAttribute));
state.ClassifiedTagArray[3] = new("classToLog.GetOnlyProperty", classToLog?.GetOnlyProperty, new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute));
state.ClassifiedTagArray[2] = new("classToLog.NonFormattableProperty", classToLog?.NonFormattableProperty.ToString(), new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute));
state.ClassifiedTagArray[1] = new("classToLog.TransitiveProp.TransitiveStringProp", classToLog?.TransitiveProp?.TransitiveStringProp, new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute));
state.ClassifiedTagArray[0] = new("classToLog.StringPropertyBase", classToLog?.StringPropertyBase, new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute));
logger.Log(
level,
new(1646893115, nameof(LogNoParamsDefaultCtor)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return string.Empty;
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Emits a structured log entry.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void LogTwoParamsDefaultCtor(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.Extensions.Logging.LogLevel level, string stringProperty, global::TestClasses.LogPropertiesRedactionExtensions.MyTransitiveClass? complexParam)
{
if (!logger.IsEnabled(level))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("complexParam.TransitiveNumberProp", complexParam?.TransitiveNumberProp);
_ = state.ReserveClassifiedTagSpace(2);
state.ClassifiedTagArray[1] = new("stringProperty", stringProperty, new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute));
state.ClassifiedTagArray[0] = new("complexParam.TransitiveStringProp", complexParam?.TransitiveStringProp, new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute));
logger.Log(
level,
new(1692196718, nameof(LogTwoParamsDefaultCtor)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return string.Empty;
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "User {userId} has now different status" at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void UserAvailabilityChanged(this global::Microsoft.Extensions.Logging.ILogger logger, string userId, global::TestClasses.LogPropertiesRedactionExtensions.ClassWithPrivateData param)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("{OriginalFormat}", "User {userId} has now different status");
_ = state.ReserveClassifiedTagSpace(2);
state.ClassifiedTagArray[1] = new("userId", userId, new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute));
state.ClassifiedTagArray[0] = new("param.UserId", param?.UserId, new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute));
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(775799131, nameof(UserAvailabilityChanged)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var userId = s.RedactedTagArray[1].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"User {userId} has now different status");
#else
return global::System.FormattableString.Invariant($"User {userId} has now different status");
#endif
});
}
finally
{
state.Clear();
}
}
}
}
namespace TestClasses
{
partial class LogPropertiesSimpleExtensions
{
/// <summary>
/// Logs "{p0}" at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void LogFunc(global::Microsoft.Extensions.Logging.ILogger logger, string p0, global::TestClasses.LogPropertiesSimpleExtensions.MyProps myProps)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(10);
state.TagArray[9] = new("{OriginalFormat}", "{p0}");
state.TagArray[8] = new("p0", p0);
state.TagArray[7] = new("myProps.P1", myProps?.P1);
state.TagArray[6] = new("myProps.P2", myProps?.P2);
state.TagArray[5] = new("myProps.P3", myProps?.P3);
state.TagArray[4] = new("myProps.P4", myProps?.P4);
state.TagArray[3] = new("myProps.class", myProps?.@class);
state.TagArray[2] = new("myProps.P5", global::Microsoft.Extensions.Logging.LoggerMessageHelper.Stringify(myProps?.P5));
state.TagArray[1] = new("myProps.P6", global::Microsoft.Extensions.Logging.LoggerMessageHelper.Stringify(myProps?.P6));
state.TagArray[0] = new("myProps.P7", global::Microsoft.Extensions.Logging.LoggerMessageHelper.Stringify(myProps?.P7));
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(0, nameof(LogFunc)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p0 = s.TagArray[8].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"{p0}");
#else
return global::System.FormattableString.Invariant($"{p0}");
#endif
});
}
finally
{
state.Clear();
}
}
}
}
namespace TestClasses
{
partial class LogPropertiesSpecialTypesExtensions
{
/// <summary>
/// Emits a structured log entry at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M0(global::Microsoft.Extensions.Logging.ILogger logger, global::TestClasses.LogPropertiesSpecialTypesExtensions.MyProps p)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(19);
state.TagArray[18] = new("p.P0", p?.P0.ToString(global::System.Globalization.CultureInfo.InvariantCulture));
state.TagArray[17] = new("p.P1", p?.P1.ToString(global::System.Globalization.CultureInfo.InvariantCulture));
state.TagArray[16] = new("p.P2", p?.P2.ToString(null, global::System.Globalization.CultureInfo.InvariantCulture));
state.TagArray[15] = new("p.P3", p?.P3.ToString(null, global::System.Globalization.CultureInfo.InvariantCulture));
state.TagArray[14] = new("p.P4", p?.P4);
state.TagArray[13] = new("p.P5", p?.P5);
state.TagArray[12] = new("p.P6", p?.P6);
state.TagArray[11] = new("p.P7", p?.P7);
state.TagArray[10] = new("p.P8", p?.P8);
state.TagArray[9] = new("p.P9", p?.P9);
state.TagArray[8] = new("p.P10", p?.P10.ToString(global::System.Globalization.CultureInfo.InvariantCulture));
state.TagArray[7] = new("p.P11", p?.P11.ToString(global::System.Globalization.CultureInfo.InvariantCulture));
state.TagArray[6] = new("p.P12", p?.P12.ToString());
state.TagArray[5] = new("p.P13", p?.P13.ToString());
state.TagArray[4] = new("p.P14", p?.P14.ToString());
state.TagArray[3] = new("p.P15", p?.P15.ToString());
state.TagArray[2] = new("p.P16", p?.P16.ToString(null, global::System.Globalization.CultureInfo.InvariantCulture));
state.TagArray[1] = new("p.P17", p?.P17.ToString(null, global::System.Globalization.CultureInfo.InvariantCulture));
state.TagArray[0] = new("p.P18", p?.P18.ToString(null, global::System.Globalization.CultureInfo.InvariantCulture));
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(316638712, nameof(M0)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return string.Empty;
});
}
finally
{
state.Clear();
}
}
}
}
namespace TestClasses
{
partial class MessageTestExtensions
{
/// <summary>
/// Emits a structured log entry at "Trace" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M0(global::Microsoft.Extensions.Logging.ILogger logger)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Trace))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Trace,
new(0, nameof(M0)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return string.Empty;
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Emits a structured log entry at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M1(global::Microsoft.Extensions.Logging.ILogger logger)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(1, nameof(M1)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return string.Empty;
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Emits a structured log entry at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M2(global::Microsoft.Extensions.Logging.ILogger logger)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(350193950, nameof(M2)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return string.Empty;
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Emits a structured log entry at "Trace" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M2(global::Microsoft.Extensions.Logging.ILogger logger, string p1, string p2)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Trace))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("p1", p1);
state.TagArray[0] = new("p2", p2);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Trace,
new(350193950, nameof(M2)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return string.Empty;
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Emits a structured log entry at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M3(global::Microsoft.Extensions.Logging.ILogger logger, string p1, int p2)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("p1", p1);
state.TagArray[0] = new("p2", p2);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(366971569, nameof(M3)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return string.Empty;
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "{p1}" at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M4(global::Microsoft.Extensions.Logging.ILogger logger, string p1, int p2, int p3)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(4);
state.TagArray[3] = new("{OriginalFormat}", "{p1}");
state.TagArray[2] = new("p1", p1);
state.TagArray[1] = new("p2", p2);
state.TagArray[0] = new("p3", p3);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(383749188, nameof(M4)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p1 = s.TagArray[2].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"{p1}");
#else
return global::System.FormattableString.Invariant($"{p1}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs ""Hello" World" at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M5(global::Microsoft.Extensions.Logging.ILogger logger)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("{OriginalFormat}", "\"Hello\" World");
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(400526807, nameof(M5)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return "\"Hello\" World";
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs ""{Value1}" -> "{Value2}"".
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M6(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.Extensions.Logging.LogLevel logLevel, string value1, string value2)
{
if (!logger.IsEnabled(logLevel))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(3);
state.TagArray[2] = new("{OriginalFormat}", "\"{Value1}\" -> \"{Value2}\"");
state.TagArray[1] = new("Value1", value1);
state.TagArray[0] = new("Value2", value2);
logger.Log(
logLevel,
new(417304426, nameof(M6)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var value1 = s.TagArray[1].Value ?? "(null)";
var value2 = s.TagArray[0].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"\"{value1}\" -> \"{value2}\"");
#else
return global::System.FormattableString.Invariant($"\"{value1}\" -> \"{value2}\"");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs ""\n\r\" at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M7(global::Microsoft.Extensions.Logging.ILogger logger)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("{OriginalFormat}", "\"\n\r\\");
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(434082045, nameof(M7)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return "\"\n\r\\";
});
}
finally
{
state.Clear();
}
}
}
}
namespace TestClasses
{
partial class NestedClassTestExtensions<T>
{
partial class NestedMiddleParentClass
{
partial class NestedClass
{
/// <summary>
/// Logs "M8" at "Error" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M8(global::Microsoft.Extensions.Logging.ILogger logger)
{
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("{OriginalFormat}", "M8");
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Error,
new(8, nameof(M8)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return "M8";
});
}
finally
{
state.Clear();
}
}
}
}
}
}
namespace TestClasses
{
partial class NonStaticNestedClassTestExtensions<T>
{
partial class NonStaticNestedMiddleParentClass
{
partial class NestedClass
{
/// <summary>
/// Logs "M9" at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M9(global::Microsoft.Extensions.Logging.ILogger logger)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("{OriginalFormat}", "M9");
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(9, nameof(M9)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return "M9";
});
}
finally
{
state.Clear();
}
}
}
}
}
}
namespace TestClasses
{
partial class NonStaticNullableTestClass
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
private static readonly global::Microsoft.Extensions.Compliance.Classification.DataClassification _Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute = new global::Microsoft.Extensions.Compliance.Testing.PrivateDataAttribute().Classification;
/// <summary>
/// Logs "M2 {p0} {p1} {p2}" at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public partial void M2(string p0, string p1, string p2)
{
if (_logger == null)
{
return;
}
if (!_logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("{OriginalFormat}", "M2 {p0} {p1} {p2}");
_ = state.ReserveClassifiedTagSpace(3);
state.ClassifiedTagArray[2] = new("p0", p0, new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute));
state.ClassifiedTagArray[1] = new("p1", p1, new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute));
state.ClassifiedTagArray[0] = new("p2", p2, new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute));
_logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(2, nameof(M2)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p0 = s.RedactedTagArray[2].Value ?? "(null)";
var p1 = s.RedactedTagArray[1].Value ?? "(null)";
var p2 = s.RedactedTagArray[0].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M2 {p0} {p1} {p2}");
#else
return global::System.FormattableString.Invariant($"M2 {p0} {p1} {p2}");
#endif
});
}
finally
{
state.Clear();
}
}
}
}
namespace TestClasses
{
partial class NonStaticTestClass
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
private static readonly global::Microsoft.Extensions.Compliance.Classification.DataClassification _Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute = new global::Microsoft.Extensions.Compliance.Testing.PrivateDataAttribute().Classification;
/// <summary>
/// Logs "M0 {p0}" at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public partial void M0(string p0)
{
if (!_logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "M0 {p0}");
state.TagArray[0] = new("p0", p0);
_logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(0, nameof(M0)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p0 = s.TagArray[0].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M0 {p0}");
#else
return global::System.FormattableString.Invariant($"M0 {p0}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M1 {p0}" at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public partial void M1(string p0)
{
if (!_logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("{OriginalFormat}", "M1 {p0}");
_ = state.ReserveClassifiedTagSpace(1);
state.ClassifiedTagArray[0] = new("p0", p0, new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute));
_logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(1, nameof(M1)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p0 = s.RedactedTagArray[0].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M1 {p0}");
#else
return global::System.FormattableString.Invariant($"M1 {p0}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M2 {p0} {p1} {p2}" at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public partial void M2(string p0, string p1, string p2)
{
if (!_logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("{OriginalFormat}", "M2 {p0} {p1} {p2}");
_ = state.ReserveClassifiedTagSpace(3);
state.ClassifiedTagArray[2] = new("p0", p0, new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute));
state.ClassifiedTagArray[1] = new("p1", p1, new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute));
state.ClassifiedTagArray[0] = new("p2", p2, new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute));
_logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(2, nameof(M2)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p0 = s.RedactedTagArray[2].Value ?? "(null)";
var p1 = s.RedactedTagArray[1].Value ?? "(null)";
var p2 = s.RedactedTagArray[0].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M2 {p0} {p1} {p2}");
#else
return global::System.FormattableString.Invariant($"M2 {p0} {p1} {p2}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Emits a structured log entry.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public partial void M3(global::Microsoft.Extensions.Logging.LogLevel level, string p0)
{
if (!_logger.IsEnabled(level))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveClassifiedTagSpace(1);
state.ClassifiedTagArray[0] = new("p0", p0, new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute));
_logger.Log(
level,
new(366971569, nameof(M3)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return string.Empty;
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "LogProperties: {P0}" at "Information" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
internal partial void LogProperties(string p0, global::TestClasses.ClassToLog p1)
{
if (!_logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Information))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(5);
state.TagArray[4] = new("{OriginalFormat}", "LogProperties: {P0}");
state.TagArray[3] = new("P0", p0);
state.TagArray[2] = new("p1.MyIntProperty", p1?.MyIntProperty);
state.TagArray[1] = new("p1.MyStringProperty", p1?.MyStringProperty);
state.TagArray[0] = new("p1.AnotherStringProperty", p1?.AnotherStringProperty);
_logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Information,
new(4, nameof(LogProperties)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p0 = s.TagArray[3].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"LogProperties: {p0}");
#else
return global::System.FormattableString.Invariant($"LogProperties: {p0}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "LogProperties with provider: {P0}, {P1}" at "Information" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
internal partial void LogPropertiesWithProvider(string p0, global::TestClasses.ClassToLog p1)
{
if (!_logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Information))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(3);
state.TagArray[2] = new("{OriginalFormat}", "LogProperties with provider: {P0}, {P1}");
state.TagArray[1] = new("P0", p0);
state.TagArray[0] = new("P1", p1);
state.TagNamePrefix = nameof(p1);
global::TestClasses.CustomProvider.ProvideTags(state, p1);
_logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Information,
new(5, nameof(LogPropertiesWithProvider)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p0 = s.TagArray[1].Value ?? "(null)";
var p1 = s.TagArray[0].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"LogProperties with provider: {p0}, {p1}");
#else
return global::System.FormattableString.Invariant($"LogProperties with provider: {p0}, {p1}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "LogProperties with redaction: {P0}" at "Information" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
internal partial void LogPropertiesWithRedaction(string p0, global::TestClasses.LogPropertiesRedactionExtensions.MyBaseClassToRedact p1)
{
if (!_logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Information))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("{OriginalFormat}", "LogProperties with redaction: {P0}");
_ = state.ReserveClassifiedTagSpace(2);
state.ClassifiedTagArray[1] = new("P0", p0, new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute));
state.ClassifiedTagArray[0] = new("p1.StringPropertyBase", p1?.StringPropertyBase, new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute));
_logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Information,
new(6, nameof(LogPropertiesWithRedaction)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p0 = s.RedactedTagArray[1].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"LogProperties with redaction: {p0}");
#else
return global::System.FormattableString.Invariant($"LogProperties with redaction: {p0}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Emits a structured log entry.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
internal partial void DefaultAttrCtorLogPropertiesWithProvider(global::Microsoft.Extensions.Logging.LogLevel level, string p0, global::TestClasses.ClassToLog p1)
{
if (!_logger.IsEnabled(level))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("p0", p0);
state.TagNamePrefix = nameof(p1);
global::TestClasses.CustomProvider.ProvideTags(state, p1);
_logger.Log(
level,
new(1481623001, nameof(DefaultAttrCtorLogPropertiesWithProvider)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return string.Empty;
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Emits a structured log entry.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
internal partial void DefaultAttrCtorLogPropertiesWithRedaction(global::Microsoft.Extensions.Logging.LogLevel level, string p0, global::TestClasses.LogPropertiesRedactionExtensions.MyBaseClassToRedact p1)
{
if (!_logger.IsEnabled(level))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveClassifiedTagSpace(2);
state.ClassifiedTagArray[1] = new("p0", p0, new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute));
state.ClassifiedTagArray[0] = new("p1.StringPropertyBase", p1?.StringPropertyBase, new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute));
_logger.Log(
level,
new(1493059541, nameof(DefaultAttrCtorLogPropertiesWithRedaction)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return string.Empty;
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "No params here..." at "Warning" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public partial void NoParams()
{
if (!_logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Warning))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("{OriginalFormat}", "No params here...");
_logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Warning,
new(7, nameof(NoParams)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return "No params here...";
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "No params here as well...".
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public partial void NoParamsWithLevel(global::Microsoft.Extensions.Logging.LogLevel level)
{
if (!_logger.IsEnabled(level))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("{OriginalFormat}", "No params here as well...");
_logger.Log(
level,
new(698263610, nameof(NoParamsWithLevel)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return "No params here as well...";
});
}
finally
{
state.Clear();
}
}
}
}
namespace TestClasses
{
partial class NullableTestExtensions
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
private static readonly global::Microsoft.Extensions.Compliance.Classification.DataClassification _Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute = new global::Microsoft.Extensions.Compliance.Testing.PrivateDataAttribute().Classification;
/// <summary>
/// Logs "M0 {p0}" at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
internal static partial void M0(global::Microsoft.Extensions.Logging.ILogger logger, string? p0)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "M0 {p0}");
state.TagArray[0] = new("p0", p0);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(0, nameof(M0)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p0 = s.TagArray[0].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M0 {p0}");
#else
return global::System.FormattableString.Invariant($"M0 {p0}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M1 {p0}" at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
internal static partial void M1(global::Microsoft.Extensions.Logging.ILogger logger, int? p0)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "M1 {p0}");
state.TagArray[0] = new("p0", p0);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(1, nameof(M1)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p0 = s.TagArray[0].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M1 {p0}");
#else
return global::System.FormattableString.Invariant($"M1 {p0}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M3 {p0}" at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
internal static partial void M3(global::Microsoft.Extensions.Logging.ILogger logger, string? p0)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("{OriginalFormat}", "M3 {p0}");
_ = state.ReserveClassifiedTagSpace(1);
state.ClassifiedTagArray[0] = new("p0", p0, new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute));
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(3, nameof(M3)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p0 = s.RedactedTagArray[0].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M3 {p0}");
#else
return global::System.FormattableString.Invariant($"M3 {p0}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M4 {p0} {p1} {p2} {p3} {p4} {p5} {p6} {p7} {p8}" at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
internal static partial void M4(global::Microsoft.Extensions.Logging.ILogger logger, int? p0, int? p1, int? p2, int? p3, int? p4, int? p5, int? p6, int? p7, int? p8)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(10);
state.TagArray[9] = new("{OriginalFormat}", "M4 {p0} {p1} {p2} {p3} {p4} {p5} {p6} {p7} {p8}");
state.TagArray[8] = new("p0", p0);
state.TagArray[7] = new("p1", p1);
state.TagArray[6] = new("p2", p2);
state.TagArray[5] = new("p3", p3);
state.TagArray[4] = new("p4", p4);
state.TagArray[3] = new("p5", p5);
state.TagArray[2] = new("p6", p6);
state.TagArray[1] = new("p7", p7);
state.TagArray[0] = new("p8", p8);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(4, nameof(M4)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p0 = s.TagArray[8].Value ?? "(null)";
var p1 = s.TagArray[7].Value ?? "(null)";
var p2 = s.TagArray[6].Value ?? "(null)";
var p3 = s.TagArray[5].Value ?? "(null)";
var p4 = s.TagArray[4].Value ?? "(null)";
var p5 = s.TagArray[3].Value ?? "(null)";
var p6 = s.TagArray[2].Value ?? "(null)";
var p7 = s.TagArray[1].Value ?? "(null)";
var p8 = s.TagArray[0].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M4 {p0} {p1} {p2} {p3} {p4} {p5} {p6} {p7} {p8}");
#else
return global::System.FormattableString.Invariant($"M4 {p0} {p1} {p2} {p3} {p4} {p5} {p6} {p7} {p8}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M5 {p0} {p1} {p2} {p3} {p4} {p5} {p6} {p7} {p8}" at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
internal static partial void M5(global::Microsoft.Extensions.Logging.ILogger logger, string? p0, string? p1, string? p2, string? p3, string? p4, string? p5, string? p6, string? p7, string? p8)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(10);
state.TagArray[9] = new("{OriginalFormat}", "M5 {p0} {p1} {p2} {p3} {p4} {p5} {p6} {p7} {p8}");
state.TagArray[8] = new("p0", p0);
state.TagArray[7] = new("p1", p1);
state.TagArray[6] = new("p2", p2);
state.TagArray[5] = new("p3", p3);
state.TagArray[4] = new("p4", p4);
state.TagArray[3] = new("p5", p5);
state.TagArray[2] = new("p6", p6);
state.TagArray[1] = new("p7", p7);
state.TagArray[0] = new("p8", p8);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(5, nameof(M5)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p0 = s.TagArray[8].Value ?? "(null)";
var p1 = s.TagArray[7].Value ?? "(null)";
var p2 = s.TagArray[6].Value ?? "(null)";
var p3 = s.TagArray[5].Value ?? "(null)";
var p4 = s.TagArray[4].Value ?? "(null)";
var p5 = s.TagArray[3].Value ?? "(null)";
var p6 = s.TagArray[2].Value ?? "(null)";
var p7 = s.TagArray[1].Value ?? "(null)";
var p8 = s.TagArray[0].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M5 {p0} {p1} {p2} {p3} {p4} {p5} {p6} {p7} {p8}");
#else
return global::System.FormattableString.Invariant($"M5 {p0} {p1} {p2} {p3} {p4} {p5} {p6} {p7} {p8}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M6 {p0}" at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
internal static partial void M6(global::Microsoft.Extensions.Logging.ILogger? logger, string? p0)
{
if (logger == null)
{
return;
}
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("{OriginalFormat}", "M6 {p0}");
_ = state.ReserveClassifiedTagSpace(1);
state.ClassifiedTagArray[0] = new("p0", p0, new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute));
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(6, nameof(M6)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p0 = s.RedactedTagArray[0].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M6 {p0}");
#else
return global::System.FormattableString.Invariant($"M6 {p0}");
#endif
});
}
finally
{
state.Clear();
}
}
}
}
namespace TestClasses
{
partial class OriginalFormatTestExtensions
{
/// <summary>
/// Logs "M0" at "Information" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M0(global::Microsoft.Extensions.Logging.ILogger logger)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Information))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("{OriginalFormat}", "M0");
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Information,
new(0, nameof(M0)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return "M0";
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M1 {p0}" at "Information" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M1(global::Microsoft.Extensions.Logging.ILogger logger, string p0)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Information))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "M1 {p0}");
state.TagArray[0] = new("p0", p0);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Information,
new(1, nameof(M1)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p0 = s.TagArray[0].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M1 {p0}");
#else
return global::System.FormattableString.Invariant($"M1 {p0}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M2 {p0}{p1}" at "Information" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M2(global::Microsoft.Extensions.Logging.ILogger logger, string p0, string p1)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Information))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(3);
state.TagArray[2] = new("{OriginalFormat}", "M2 {p0}{p1}");
state.TagArray[1] = new("p0", p0);
state.TagArray[0] = new("p1", p1);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Information,
new(2, nameof(M2)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p0 = s.TagArray[1].Value ?? "(null)";
var p1 = s.TagArray[0].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M2 {p0}{p1}");
#else
return global::System.FormattableString.Invariant($"M2 {p0}{p1}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Emits a structured log entry at "Information" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M3(global::Microsoft.Extensions.Logging.ILogger logger, string p0, string p1, string p2)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Information))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(3);
state.TagArray[2] = new("p0", p0);
state.TagArray[1] = new("p1", p1);
state.TagArray[0] = new("p2", p2);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Information,
new(366971569, nameof(M3)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return string.Empty;
});
}
finally
{
state.Clear();
}
}
}
}
namespace TestClasses
{
partial class OverloadsTestExtensions
{
/// <summary>
/// Logs "M0 {v}" at "Information" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
internal static partial void M0(global::Microsoft.Extensions.Logging.ILogger logger, int v)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Information))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "M0 {v}");
state.TagArray[0] = new("v", v);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Information,
new(0, "One"),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var v = s.TagArray[0].Value;
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M0 {v}");
#else
return global::System.FormattableString.Invariant($"M0 {v}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M0 {v}" at "Information" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
internal static partial void M0(global::Microsoft.Extensions.Logging.ILogger logger, string v)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Information))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "M0 {v}");
state.TagArray[0] = new("v", v);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Information,
new(1, "Two"),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var v = s.TagArray[0].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M0 {v}");
#else
return global::System.FormattableString.Invariant($"M0 {v}");
#endif
});
}
finally
{
state.Clear();
}
}
}
}
namespace TestClasses
{
partial class PrivateLoggerInNullablePropertyDerivedTestClass
{
/// <summary>
/// Logs "M1 {p0}" at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public partial void M1(string p0)
{
if (!_logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "M1 {p0}");
state.TagArray[0] = new("p0", p0);
_logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(1, nameof(M1)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p0 = s.TagArray[0].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M1 {p0}");
#else
return global::System.FormattableString.Invariant($"M1 {p0}");
#endif
});
}
finally
{
state.Clear();
}
}
}
}
namespace TestClasses
{
partial record RecordTestExtensions
{
/// <summary>
/// Logs "M0" at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M0(global::Microsoft.Extensions.Logging.ILogger logger)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("{OriginalFormat}", "M0");
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(12, nameof(M0)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return "M0";
});
}
finally
{
state.Clear();
}
}
}
}
namespace TestClasses
{
partial record RecordWithPrimaryConstructor
{
/// <summary>
/// Logs "Test." at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public partial void Test()
{
if (!Logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("{OriginalFormat}", "Test.");
Logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(0, nameof(Test)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return "Test.";
});
}
finally
{
state.Clear();
}
}
}
}
namespace TestClasses
{
partial class RefReadOnlyParameterTestExtensions
{
/// <summary>
/// Logs "M0 {s}" at "Information" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
internal static partial void M0(global::Microsoft.Extensions.Logging.ILogger logger, ref readonly global::TestClasses.RefReadOnlyParameterTestExtensions.S s)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Information))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "M0 {s}");
state.TagArray[0] = new("s", s.ToString());
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Information,
new(0, nameof(M0)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s_, _) =>
{
var s = s_.TagArray[0].Value;
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M0 {s}");
#else
return global::System.FormattableString.Invariant($"M0 {s}");
#endif
});
}
finally
{
state.Clear();
}
}
}
}
namespace TestClasses
{
partial class SensitiveRecordExtensions
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
private static readonly global::Microsoft.Extensions.Compliance.Classification.DataClassification _Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute = new global::Microsoft.Extensions.Compliance.Testing.PrivateDataAttribute().Classification;
/// <summary>
/// Logs "Param is {p0}" at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void LogInTemplate(global::Microsoft.Extensions.Logging.ILogger logger, global::TestClasses.SensitiveRecordExtensions.MyRecord p0)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "Param is {p0}");
state.TagArray[0] = new("p0", p0);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(254321108, nameof(LogInTemplate)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p0 = s.TagArray[0].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"Param is {p0}");
#else
return global::System.FormattableString.Invariant($"Param is {p0}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Emits a structured log entry at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void LogFullyStructured(global::Microsoft.Extensions.Logging.ILogger logger, global::TestClasses.SensitiveRecordExtensions.MyRecord p0)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("p0", p0);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(1052991204, nameof(LogFullyStructured)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return string.Empty;
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "Data was obtained" at "Information" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void LogPropertiesWithTemplate(global::Microsoft.Extensions.Logging.ILogger logger, global::TestClasses.SensitiveRecordExtensions.RecordWithSensitiveMembers data)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Information))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("{OriginalFormat}", "Data was obtained");
_ = state.ReserveClassifiedTagSpace(3);
state.ClassifiedTagArray[2] = new("data.AnnotatedArgFromPrimaryCtor", data?.AnnotatedArgFromPrimaryCtor, new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute));
state.ClassifiedTagArray[1] = new("data.AnnotatedPropFromPrimaryCtor", data?.AnnotatedPropFromPrimaryCtor, new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute));
state.ClassifiedTagArray[0] = new("data.PropGetSet", data?.PropGetSet, new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute));
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Information,
new(1712726278, nameof(LogPropertiesWithTemplate)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return "Data was obtained";
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Emits a structured log entry at "Information" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void LogPropertiesFullyStructured(global::Microsoft.Extensions.Logging.ILogger logger, global::TestClasses.SensitiveRecordExtensions.RecordWithSensitiveMembers data)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Information))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveClassifiedTagSpace(3);
state.ClassifiedTagArray[2] = new("data.AnnotatedArgFromPrimaryCtor", data?.AnnotatedArgFromPrimaryCtor, new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute));
state.ClassifiedTagArray[1] = new("data.AnnotatedPropFromPrimaryCtor", data?.AnnotatedPropFromPrimaryCtor, new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute));
state.ClassifiedTagArray[0] = new("data.PropGetSet", data?.PropGetSet, new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute));
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Information,
new(2110072513, nameof(LogPropertiesFullyStructured)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return string.Empty;
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "Data is {data}" at "Information" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void LogInTemplateWithAnnotation(global::Microsoft.Extensions.Logging.ILogger logger, global::TestClasses.SensitiveRecordExtensions.RecordWithSensitiveMembers data)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Information))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("{OriginalFormat}", "Data is {data}");
_ = state.ReserveClassifiedTagSpace(1);
state.ClassifiedTagArray[0] = new("data", data, new global::Microsoft.Extensions.Compliance.Classification.DataClassificationSet(_Microsoft_Extensions_Compliance_Testing_PrivateDataAttribute));
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Information,
new(1986969047, nameof(LogInTemplateWithAnnotation)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var data = s.RedactedTagArray[0].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"Data is {data}");
#else
return global::System.FormattableString.Invariant($"Data is {data}");
#endif
});
}
finally
{
state.Clear();
}
}
}
}
namespace TestClasses
{
partial class SignatureTestExtensions
{
/// <summary>
/// Logs "Message11" at "Critical" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
internal static partial void M11(this global::Microsoft.Extensions.Logging.ILogger logger)
{
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("{OriginalFormat}", "Message11");
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Critical,
new(10, nameof(M11)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return "Message11";
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "{p1} {p2}" at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
internal static partial void M2(global::Microsoft.Extensions.Logging.ILogger logger, string p1, string p2)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(3);
state.TagArray[2] = new("{OriginalFormat}", "{p1} {p2}");
state.TagArray[1] = new("p1", p1);
state.TagArray[0] = new("p2", p2);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(1, nameof(M2)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p1 = s.TagArray[1].Value ?? "(null)";
var p2 = s.TagArray[0].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"{p1} {p2}");
#else
return global::System.FormattableString.Invariant($"{p1} {p2}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "{helper}" at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
internal static partial void M3(global::Microsoft.Extensions.Logging.ILogger logger, string helper)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "{helper}");
state.TagArray[0] = new("helper", helper);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(2, nameof(M3)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var helper = s.TagArray[0].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"{helper}");
#else
return global::System.FormattableString.Invariant($"{helper}");
#endif
});
}
finally
{
state.Clear();
}
}
}
}
namespace TestClasses
{
partial class SignatureTestExtensions<T>
{
/// <summary>
/// Logs "Message1" at "Critical" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M1(global::Microsoft.Extensions.Logging.ILogger logger)
{
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("{OriginalFormat}", "Message1");
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Critical,
new(0, nameof(M1)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return "Message1";
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "Message2" at "Critical" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
internal static partial void M2(global::Microsoft.Extensions.Logging.ILogger logger)
{
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("{OriginalFormat}", "Message2");
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Critical,
new(1, nameof(M2)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return "Message2";
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "Message3" at "Critical" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
private static partial void M3(global::Microsoft.Extensions.Logging.ILogger logger)
{
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("{OriginalFormat}", "Message3");
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Critical,
new(2, nameof(M3)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return "Message3";
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "Message4" at "Critical" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
private static partial void M4(global::Microsoft.Extensions.Logging.ILogger<int> logger)
{
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("{OriginalFormat}", "Message4");
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Critical,
new(3, nameof(M4)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return "Message4";
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "Message5 {items}" at "Critical" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
private static partial void M5(global::Microsoft.Extensions.Logging.ILogger logger, global::System.Collections.IEnumerable items)
{
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "Message5 {items}");
state.TagArray[0] = new("items", items != null ? global::Microsoft.Extensions.Logging.LoggerMessageHelper.Stringify(items) : null);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Critical,
new(4, nameof(M5)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var items = s.TagArray[0].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"Message5 {items}");
#else
return global::System.FormattableString.Invariant($"Message5 {items}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "Message6\n"\r" at "Critical" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
private static partial void M6(global::Microsoft.Extensions.Logging.ILogger logger)
{
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("{OriginalFormat}", "Message6\n\"\r");
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Critical,
new(5, nameof(M6)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return "Message6\n\"\r";
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "Message7 {p1}\n"\r" at "Critical" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
private static partial void M7(global::Microsoft.Extensions.Logging.ILogger logger, T p1)
{
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "Message7 {p1}\n\"\r");
state.TagArray[0] = new("p1", p1);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Critical,
new(6, nameof(M7)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p1 = s.TagArray[0].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"Message7 {p1}\n\"\r");
#else
return global::System.FormattableString.Invariant($"Message7 {p1}\n\"\r");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "Message8" at "Critical" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
private protected static partial void M8(global::Microsoft.Extensions.Logging.ILogger logger)
{
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("{OriginalFormat}", "Message8");
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Critical,
new(7, nameof(M8)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return "Message8";
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "Message9" at "Critical" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
protected internal static partial void M9(global::Microsoft.Extensions.Logging.ILogger logger)
{
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("{OriginalFormat}", "Message9");
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Critical,
new(8, nameof(M9)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return "Message9";
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "Message10 {optional}" at "Critical" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
internal static partial void M10(global::Microsoft.Extensions.Logging.ILogger logger, string? optional)
{
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "Message10 {optional}");
state.TagArray[0] = new("optional", optional);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Critical,
new(9, nameof(M10)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var optional = s.TagArray[0].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"Message10 {optional}");
#else
return global::System.FormattableString.Invariant($"Message10 {optional}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "Message11 {p1} {p2}".
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
internal static partial void M11(global::Microsoft.Extensions.Logging.ILogger logger, string p1, global::Microsoft.Extensions.Logging.LogLevel level, string p2)
{
if (!logger.IsEnabled(level))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(3);
state.TagArray[2] = new("{OriginalFormat}", "Message11 {p1} {p2}");
state.TagArray[1] = new("p1", p1);
state.TagArray[0] = new("p2", p2);
logger.Log(
level,
new(48409038, nameof(M11)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p1 = s.TagArray[1].Value ?? "(null)";
var p2 = s.TagArray[0].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"Message11 {p1} {p2}");
#else
return global::System.FormattableString.Invariant($"Message11 {p1} {p2}");
#endif
});
}
finally
{
state.Clear();
}
}
}
}
namespace TestClasses
{
partial class SkipEnabledCheckTestExtensions
{
/// <summary>
/// Logs "M0" at "Information" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
internal static partial void LoggerMethodWithTrueSkipEnabledCheck(global::Microsoft.Extensions.Logging.ILogger logger)
{
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("{OriginalFormat}", "M0");
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Information,
new(0, nameof(LoggerMethodWithTrueSkipEnabledCheck)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return "M0";
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M1" at "Information" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
internal static partial void LoggerMethodWithFalseSkipEnabledCheck(global::Microsoft.Extensions.Logging.ILogger logger)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Information))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("{OriginalFormat}", "M1");
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Information,
new(1, nameof(LoggerMethodWithFalseSkipEnabledCheck)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return "M1";
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Emits a structured log entry.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
internal static partial void LoggerMethodWithFalseSkipEnabledCheck(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.Extensions.Logging.LogLevel level, string p1)
{
if (!logger.IsEnabled(level))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("p1", p1);
logger.Log(
level,
new(270070563, nameof(LoggerMethodWithFalseSkipEnabledCheck)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return string.Empty;
});
}
finally
{
state.Clear();
}
}
}
}
namespace TestClasses
{
partial struct StructTestExtensions
{
/// <summary>
/// Logs "M0" at "Trace" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M0(global::Microsoft.Extensions.Logging.ILogger logger)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Trace))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("{OriginalFormat}", "M0");
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Trace,
new(0, nameof(M0)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return "M0";
});
}
finally
{
state.Clear();
}
}
}
}
namespace TestClasses
{
partial class TagNameExtensions
{
/// <summary>
/// Emits a structured log entry at "Warning" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
internal static partial void M0(global::Microsoft.Extensions.Logging.ILogger logger, int p0)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Warning))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("TN1", p0);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Warning,
new(316638712, nameof(M0)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return string.Empty;
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "{foo.bar}" at "Warning" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
internal static partial void M1(global::Microsoft.Extensions.Logging.ILogger logger, int p0)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Warning))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "{foo.bar}");
state.TagArray[0] = new("foo.bar", p0);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Warning,
new(333416331, nameof(M1)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p0 = s.TagArray[0].Value;
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"{p0}");
#else
return global::System.FormattableString.Invariant($"{p0}");
#endif
});
}
finally
{
state.Clear();
}
}
}
}
namespace TestClasses
{
partial class TagProviderExtensions
{
/// <summary>
/// Logs "Custom provided properties for {Param}." at "Warning" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
internal static partial void LogMethodCustomPropsProvider(global::Microsoft.Extensions.Logging.ILogger logger, global::TestClasses.ClassToLog param)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Warning))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "Custom provided properties for {Param}.");
state.TagArray[0] = new("Param", param);
state.TagNamePrefix = nameof(param);
global::TestClasses.CustomProvider.ProvideTags(state, param);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Warning,
new(2147483647, nameof(LogMethodCustomPropsProvider)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var param = s.TagArray[0].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"Custom provided properties for {param}.");
#else
return global::System.FormattableString.Invariant($"Custom provided properties for {param}.");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "Custom provided properties for struct." at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
internal static partial void LogMethodCustomPropsProviderStruct(global::Microsoft.Extensions.Logging.ILogger logger, global::TestClasses.StructToLog param)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("{OriginalFormat}", "Custom provided properties for struct.");
state.TagNamePrefix = nameof(param);
global::TestClasses.CustomProvider.ProvideForStruct(state, param);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(680080969, nameof(LogMethodCustomPropsProviderStruct)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return "Custom provided properties for struct.";
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "Custom provided properties for interface." at "Information" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
internal static partial void LogMethodCustomPropsProviderInterface(global::Microsoft.Extensions.Logging.ILogger logger, global::TestClasses.IInterfaceToLog param)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Information))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("{OriginalFormat}", "Custom provided properties for interface.");
state.TagNamePrefix = nameof(param);
global::TestClasses.CustomProvider.ProvideForInterface(state, param);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Information,
new(1212175401, nameof(LogMethodCustomPropsProviderInterface)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return "Custom provided properties for interface.";
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "Custom provided properties for both complex params and {StringParam}." at "Warning" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
internal static partial void LogMethodCustomPropsProviderTwoParams(global::Microsoft.Extensions.Logging.ILogger logger, string stringParam, global::TestClasses.ClassToLog param, global::TestClasses.ClassToLog param2)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Warning))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "Custom provided properties for both complex params and {StringParam}.");
state.TagArray[0] = new("StringParam", stringParam);
state.TagNamePrefix = nameof(param);
global::TestClasses.CustomProvider.ProvideTags(state, param);
state.TagNamePrefix = nameof(param2);
global::TestClasses.CustomProvider.ProvideOtherTags(state, param2);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Warning,
new(-2147483648, nameof(LogMethodCustomPropsProviderTwoParams)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var stringParam = s.TagArray[0].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"Custom provided properties for both complex params and {stringParam}.");
#else
return global::System.FormattableString.Invariant($"Custom provided properties for both complex params and {stringParam}.");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "No params." at "Warning" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
internal static partial void LogMethodCombinePropsProvider(global::Microsoft.Extensions.Logging.ILogger logger, global::TestClasses.ClassToLog param1, global::TestClasses.ClassToLog param2)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Warning))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(4);
state.TagArray[3] = new("{OriginalFormat}", "No params.");
state.TagArray[2] = new("param1.MyIntProperty", param1?.MyIntProperty);
state.TagArray[1] = new("param1.MyStringProperty", param1?.MyStringProperty);
state.TagArray[0] = new("param1.AnotherStringProperty", param1?.AnotherStringProperty);
state.TagNamePrefix = nameof(param2);
global::TestClasses.CustomProvider.ProvideTags(state, param2);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Warning,
new(1, nameof(LogMethodCombinePropsProvider)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return "No params.";
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Emits a structured log entry.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
internal static partial void DefaultAttributeCtor(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.Extensions.Logging.LogLevel level, global::TestClasses.ClassToLog param)
{
if (!logger.IsEnabled(level))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
state.TagNamePrefix = nameof(param);
global::TestClasses.CustomProvider.ProvideTags(state, param);
logger.Log(
level,
new(2048786788, nameof(DefaultAttributeCtor)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return string.Empty;
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Emits a structured log entry.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
internal static partial void Nullable(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.Extensions.Logging.LogLevel level, int? param)
{
if (!logger.IsEnabled(level))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
state.TagNamePrefix = nameof(param);
global::TestClasses.CustomProvider.ProvideTags(state, param);
logger.Log(
level,
new(1447003228, nameof(Nullable)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return string.Empty;
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Emits a structured log entry.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
internal static partial void Enumerable(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.Extensions.Logging.LogLevel level, global::System.Collections.Generic.IEnumerable<string> things)
{
if (!logger.IsEnabled(level))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
state.TagNamePrefix = nameof(things);
global::TestClasses.CustomProvider.ProvideForEnumerable(state, things);
logger.Log(
level,
new(2027319661, nameof(Enumerable)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return string.Empty;
});
}
finally
{
state.Clear();
}
}
}
}
namespace TestClasses
{
partial class TagProviderWithObjectExtensions
{
/// <summary>
/// Logs "Custom provided properties for {Param}." at "Warning" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
internal static partial void OneParam(global::Microsoft.Extensions.Logging.ILogger logger, object param)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Warning))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "Custom provided properties for {Param}.");
state.TagArray[0] = new("Param", param);
state.TagNamePrefix = nameof(param);
global::TestClasses.CustomProviderWithObject.ProvideProperties(state, param);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Warning,
new(2147483647, nameof(OneParam)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var param = s.TagArray[0].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"Custom provided properties for {param}.");
#else
return global::System.FormattableString.Invariant($"Custom provided properties for {param}.");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "Custom provided properties for both complex params and {StringParam}." at "Warning" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
internal static partial void TwoParams(global::Microsoft.Extensions.Logging.ILogger logger, string stringParam, object param, object param2)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Warning))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "Custom provided properties for both complex params and {StringParam}.");
state.TagArray[0] = new("StringParam", stringParam);
state.TagNamePrefix = nameof(param);
global::TestClasses.CustomProviderWithObject.ProvideProperties(state, param);
state.TagNamePrefix = nameof(param2);
global::TestClasses.CustomProviderWithObject.ProvideOtherProperties(state, param2);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Warning,
new(-2147483648, nameof(TwoParams)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var stringParam = s.TagArray[0].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"Custom provided properties for both complex params and {stringParam}.");
#else
return global::System.FormattableString.Invariant($"Custom provided properties for both complex params and {stringParam}.");
#endif
});
}
finally
{
state.Clear();
}
}
}
}
namespace TestClasses
{
partial class TemplateTestExtensions
{
/// <summary>
/// Logs "M0 {A1}" at "Error" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M0(global::Microsoft.Extensions.Logging.ILogger logger, int a1)
{
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "M0 {A1}");
state.TagArray[0] = new("A1", a1);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Error,
new(0, nameof(M0)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var a1 = s.TagArray[0].Value;
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M0 {a1}");
#else
return global::System.FormattableString.Invariant($"M0 {a1}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M1 {A1} {A1}" at "Error" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M1(global::Microsoft.Extensions.Logging.ILogger logger, int a1)
{
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "M1 {A1} {A1}");
state.TagArray[0] = new("A1", a1);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Error,
new(1, nameof(M1)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var a1 = s.TagArray[0].Value;
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M1 {a1} {a1}");
#else
return global::System.FormattableString.Invariant($"M1 {a1} {a1}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M2 {A1} {a2} {A3} {a4} {A5} {a6} {A7}" at "Error" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M2(global::Microsoft.Extensions.Logging.ILogger logger, int a1, int a2, int a3, int a4, int a5, int a6, int a7)
{
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(8);
state.TagArray[7] = new("{OriginalFormat}", "M2 {A1} {a2} {A3} {a4} {A5} {a6} {A7}");
state.TagArray[6] = new("A1", a1);
state.TagArray[5] = new("a2", a2);
state.TagArray[4] = new("A3", a3);
state.TagArray[3] = new("a4", a4);
state.TagArray[2] = new("A5", a5);
state.TagArray[1] = new("a6", a6);
state.TagArray[0] = new("A7", a7);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Error,
new(2, nameof(M2)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var a1 = s.TagArray[6].Value;
var a2 = s.TagArray[5].Value;
var a3 = s.TagArray[4].Value;
var a4 = s.TagArray[3].Value;
var a5 = s.TagArray[2].Value;
var a6 = s.TagArray[1].Value;
var a7 = s.TagArray[0].Value;
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M2 {a1} {a2} {a3} {a4} {a5} {a6} {a7}");
#else
return global::System.FormattableString.Invariant($"M2 {a1} {a2} {a3} {a4} {a5} {a6} {a7}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M3 {a2} {A1}" at "Error" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M3(global::Microsoft.Extensions.Logging.ILogger logger, int a1, int a2)
{
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(3);
state.TagArray[2] = new("{OriginalFormat}", "M3 {a2} {A1}");
state.TagArray[1] = new("A1", a1);
state.TagArray[0] = new("a2", a2);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Error,
new(3, nameof(M3)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var a1 = s.TagArray[1].Value;
var a2 = s.TagArray[0].Value;
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M3 {a2} {a1}");
#else
return global::System.FormattableString.Invariant($"M3 {a2} {a1}");
#endif
});
}
finally
{
state.Clear();
}
}
}
}
namespace TestClasses
{
partial class TestInstances
{
/// <summary>
/// Logs "M0" at "Error" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public partial void M0()
{
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("{OriginalFormat}", "M0");
_myLogger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Error,
new(0, nameof(M0)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return "M0";
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Logs "M1 {p1}" at "Trace" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public partial void M1(string p1)
{
if (!_myLogger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Trace))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("{OriginalFormat}", "M1 {p1}");
state.TagArray[0] = new("p1", p1);
_myLogger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Trace,
new(1, nameof(M1)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
var p1 = s.TagArray[0].Value ?? "(null)";
#if NET
return string.Create(global::System.Globalization.CultureInfo.InvariantCulture, $"M1 {p1}");
#else
return global::System.FormattableString.Invariant($"M1 {p1}");
#endif
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Emits a structured log entry.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public partial void M2(global::Microsoft.Extensions.Logging.LogLevel level, string p1)
{
if (!_myLogger.IsEnabled(level))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("p1", p1);
_myLogger.Log(
level,
new(350193950, nameof(M2)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return string.Empty;
});
}
finally
{
state.Clear();
}
}
}
}
namespace TestClasses
{
partial class TransitiveTestExtensions
{
/// <summary>
/// Emits a structured log entry at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M0(global::Microsoft.Extensions.Logging.ILogger logger, global::TestClasses.TransitiveTestExtensions.C0 p0)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("p0.P0.P2", p0?.P0?.P2);
state.TagArray[0] = new("p0.P1", p0?.P1);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(316638712, nameof(M0)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return string.Empty;
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Emits a structured log entry at "Debug" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M1(global::Microsoft.Extensions.Logging.ILogger logger, global::TestClasses.TransitiveTestExtensions.C0 p0)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Debug))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("p0.P0", p0?.P0);
state.TagArray[0] = new("p0.P1", p0?.P1);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Debug,
new(333416331, nameof(M1)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return string.Empty;
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Emits a structured log entry at "Warning" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M2(global::Microsoft.Extensions.Logging.ILogger logger, global::TestClasses.TransitiveTestExtensions.C2 p0)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Warning))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(2);
state.TagArray[1] = new("p0.P3.Capacity", p0?.P3?.Capacity);
state.TagArray[0] = new("p0.P3.Count", p0?.P3?.Count);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Warning,
new(350193950, nameof(M2)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return string.Empty;
});
}
finally
{
state.Clear();
}
}
/// <summary>
/// Emits a structured log entry at "Information" level.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")]
public static partial void M3(global::Microsoft.Extensions.Logging.ILogger logger, global::TestClasses.TransitiveTestExtensions.C3 p0)
{
if (!logger.IsEnabled(global::Microsoft.Extensions.Logging.LogLevel.Information))
{
return;
}
var state = global::Microsoft.Extensions.Logging.LoggerMessageHelper.ThreadLocalState;
try
{
_ = state.ReserveTagSpace(1);
state.TagArray[0] = new("p0.P4", p0?.P4);
logger.Log(
global::Microsoft.Extensions.Logging.LogLevel.Information,
new(366971569, nameof(M3)),
state,
null,
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Gen.Logging", "10.9.0.0")] static string (s, _) =>
{
return string.Empty;
});
}
finally
{
state.Clear();
}
}
}
}