Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ private void GenStruct(LoggerMethod lm, string nestedIndentation)
{nestedIndentation}}}
");
_builder.Append($@"
{nestedIndentation}public static string Format(__{lm.Name}Struct state, global::System.Exception? ex) => state.ToString();
{nestedIndentation}public static readonly global::System.Func<__{lm.Name}Struct, global::System.Exception?, string> Format = (state, ex) => state.ToString();

{nestedIndentation}public int Count => {lm.TemplateParameters.Count + 1};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace Microsoft.Extensions.Logging.Generators.Tests.TestClasses
return $"";
}

public static string Format(__M0Struct state, global::System.Exception? ex) => state.ToString();
public static readonly global::System.Func<__M0Struct, global::System.Exception?, string> Format = (state, ex) => state.ToString();

public int Count => 1;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace Microsoft.Extensions.Logging.Generators.Tests.TestClasses
return $"M9";
}

public static string Format(__M9Struct state, global::System.Exception? ex) => state.ToString();
public static readonly global::System.Func<__M9Struct, global::System.Exception?, string> Format = (state, ex) => state.ToString();

public int Count => 1;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ namespace Microsoft.Extensions.Logging.Generators.Tests.TestClasses
return $"M9 {p1} {p2} {p3} {p4} {p5} {p6} {p7}";
}

public static string Format(__Method9Struct state, global::System.Exception? ex) => state.ToString();
public static readonly global::System.Func<__Method9Struct, global::System.Exception?, string> Format = (state, ex) => state.ToString();

public int Count => 8;

Expand Down