1 write to CodeName
Microsoft.Extensions.Logging.Generators (1)
LoggerMessageGenerator.Parser.cs (1)
388CodeName = needsAtSign ? "@" + paramName : paramName,
16 references to CodeName
Microsoft.Extensions.Logging.Generators (16)
LoggerMessageGenerator.Emitter.cs (12)
63ReadOnlySpan<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)};"); 256string 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)
415else if (lp.IsLogLevel && level != null && !lm.TemplateMap.ContainsKey(paramName) && !lm.TemplateMap.ContainsKey(lp.CodeName)) 419else if (lp.IsTemplateParameter && !lm.TemplateMap.ContainsKey(paramName) && !lm.TemplateMap.ContainsKey($"@{paramName}") && !lm.TemplateMap.ContainsKey(lp.CodeName)) 484t.Key.Equals(p.CodeName, StringComparison.OrdinalIgnoreCase) || 485t.Key[0] == '@' && t.Key.Substring(1).Equals(p.CodeName, StringComparison.OrdinalIgnoreCase))