1 write to CodeName
Microsoft.Extensions.Logging.Generators (1)
LoggerMessageGenerator.Parser.cs (1)
388
CodeName
= needsAtSign ? "@" + paramName : paramName,
16 references to CodeName
Microsoft.Extensions.Logging.Generators (16)
LoggerMessageGenerator.Emitter.cs (12)
63
ReadOnlySpan<char> parameter = RemoveSpecialSymbol(lm.TemplateParameters[i].
CodeName
.AsSpan());
203
_builder.AppendLine($" {nestedIndentation}private readonly {p.Type} {NormalizeSpecialSymbol(p.
CodeName
)};");
211
_builder.AppendLine($" {nestedIndentation}this.{NormalizeSpecialSymbol(p.
CodeName
)} = {p.
CodeName
};");
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
)};");
256
string name = p.
CodeName
;
263
_builder.AppendLine($" {nestedIndentation}{index++} => new global::System.Collections.Generic.KeyValuePair<string, object?>(\"{name}\", this.{NormalizeSpecialSymbol(p.
CodeName
)}),");
273
_builder.Append($"{p.
CodeName
}, ");
331
_builder.Append($"{p.Type} {p.
CodeName
}");
349
_builder.Append($"{p.Type} {p.
CodeName
}");
365
_builder.Append(p.
CodeName
);
LoggerMessageGenerator.Parser.cs (4)
415
else if (lp.IsLogLevel && level != null && !lm.TemplateMap.ContainsKey(paramName) && !lm.TemplateMap.ContainsKey(lp.
CodeName
))
419
else if (lp.IsTemplateParameter && !lm.TemplateMap.ContainsKey(paramName) && !lm.TemplateMap.ContainsKey($"@{paramName}") && !lm.TemplateMap.ContainsKey(lp.
CodeName
))
484
t.Key.Equals(p.
CodeName
, StringComparison.OrdinalIgnoreCase) ||
485
t.Key[0] == '@' && t.Key.Substring(1).Equals(p.
CodeName
, StringComparison.OrdinalIgnoreCase))