21 references to TemplateParameters
Microsoft.Extensions.Logging.Generators (21)
LoggerMessageGenerator.Emitter.cs (20)
53
(lm.
TemplateParameters
.Count <= MaxLoggerMessageDefineArguments) && // more args than LoggerMessage.Define can handle
55
(lm.TemplateList.Count == lm.
TemplateParameters
.Count); // mismatch in template to args, which LoggerMessage.Define can't handle
63
ReadOnlySpan<char> parameter = RemoveSpecialSymbol(lm.
TemplateParameters
[i].CodeName.AsSpan());
147
if (lm.
TemplateParameters
.Count > 0)
173
{nestedIndentation}public int Count => {lm.
TemplateParameters
.Count + 1};
188
{nestedIndentation}for (int i = 0; i < {lm.
TemplateParameters
.Count + 1}; i++)
201
foreach (LoggerParameter p in lm.
TemplateParameters
)
209
foreach (LoggerParameter p in lm.
TemplateParameters
)
220
foreach (LoggerParameter p in lm.
TemplateParameters
)
233
if (index < lm.
TemplateParameters
.Count)
235
if (lm.
TemplateParameters
[index].IsEnumerable)
238
+ $"global::__LoggerMessageGenerator.Enumerate((global::System.Collections.IEnumerable ?)this.{NormalizeSpecialSymbol(lm.
TemplateParameters
[index].CodeName)});");
244
_builder.AppendLine($" {nestedIndentation}var {t.Key} = this.{NormalizeSpecialSymbol(lm.
TemplateParameters
[index].CodeName)};");
253
foreach (LoggerParameter p in lm.
TemplateParameters
)
271
foreach (LoggerParameter p in lm.
TemplateParameters
)
279
if (lm.
TemplateParameters
.Count == 0)
289
foreach (LoggerParameter p in lm.
TemplateParameters
)
338
foreach (LoggerParameter p in lm.
TemplateParameters
)
358
foreach (LoggerParameter p in lm.
TemplateParameters
)
360
if (p != lm.
TemplateParameters
[0])
LoggerMessageGenerator.Parser.cs (1)
434
lm.
TemplateParameters
.Add(lp);