14 references to FormatStringLiteral
System.Text.Json.SourceGeneration (14)
JsonSourceGenerator.Emitter.cs (14)
851{ IsProperty: true } => $"typeof({property.DeclaringType.FullyQualifiedName}).GetProperty({FormatStringLiteral(property.MemberName)}, InstanceMemberBindingFlags, null, typeof({propertyTypeFQN}), {EmptyTypeArray}, null)", 852_ => $"typeof({property.DeclaringType.FullyQualifiedName}).GetField({FormatStringLiteral(property.MemberName)}, InstanceMemberBindingFlags)", 869PropertyName = {{FormatStringLiteral(property.MemberName)}}, 870JsonPropertyName = {{FormatStringLiteral(property.JsonPropertyName)}}, 1138string propertyExpr = $"typeof({declaringTypeFQN}).GetProperty({FormatStringLiteral(property.MemberName)}, InstanceMemberBindingFlags, null, typeof({propertyTypeFQN}), {EmptyTypeArray}, null)!"; 1187string fieldExpr = $"typeof({declaringTypeFQN}).GetField({FormatStringLiteral(property.MemberName)}, InstanceMemberBindingFlags)!"; 1454Name = {{FormatStringLiteral(spec.Name)}}, 1479Name = {{FormatStringLiteral(spec.Name)}}, 1605ThrowPropertyNullException({{FormatStringLiteral(propertyGenSpec.EffectiveJsonPropertyName)}}); 1636throw new {{JsonExceptionTypeRef}}(string.Format("{{ExceptionMessages.PropertyGetterDisallowNull}}", propertyName, {{FormatStringLiteral(typeGenSpec.TypeRef.Name)}})); 2041writer.WriteLine($"NewLine = {FormatStringLiteral(newLine)},"); 2232writer.WriteLine($$"""private static readonly {{JsonEncodedTextTypeRef}} {{name_varName_pair.Value}} = {{JsonEncodedTextTypeRef}}.Encode({{FormatStringLiteral(name_varName_pair.Key)}});"""); 2267source.AppendLine($" TypeDiscriminatorPropertyName = {FormatStringLiteral(options.TypeDiscriminatorPropertyName)},"); 2297string stringDiscriminator => $"new {JsonDerivedTypeTypeRef}({derivedTypeExpr}, {FormatStringLiteral(stringDiscriminator)})",