17 references to WriterVarName
System.Text.Json.SourceGeneration (17)
JsonSourceGenerator.Emitter.cs (17)
419
writer.WriteLine($"{
WriterVarName
}.WriteStartArray();");
459
writer.WriteLine($"{
WriterVarName
}.WriteEndArray();");
475
writer.WriteLine($"{
WriterVarName
}.WriteStartObject();");
488
writer.WriteLine($"{
WriterVarName
}.WriteEndObject();");
797
writer.WriteLine($"{
WriterVarName
}.WriteStartObject();");
892
writer.WriteLine($"{
WriterVarName
}.WriteEndObject();");
977
private void {{methodName}}({{Utf8JsonWriterTypeRef}} {{
WriterVarName
}}, {{valueTypeRef}} {{ValueVarName}})
988
{{
WriterVarName
}}.WriteNullValue();
1002
writer.WriteLine($"{
WriterVarName
}.{primitiveWriterMethod}Value({valueExpr}.ToString());");
1006
writer.WriteLine($"{
WriterVarName
}.{primitiveWriterMethod}Value({valueExpr});");
1013
writer.WriteLine($"{typeSpec.TypeInfoPropertyName}{SerializeHandlerPropName}({
WriterVarName
}, {valueExpr});");
1017
writer.WriteLine($"{JsonSerializerTypeRef}.Serialize({
WriterVarName
}, {valueExpr}, {typeSpec.TypeInfoPropertyName});");
1028
writer.WriteLine($"{
WriterVarName
}.{primitiveWriterMethod}({propertyNameExpr}, {valueExpr}.ToString());");
1032
writer.WriteLine($"{
WriterVarName
}.{primitiveWriterMethod}({propertyNameExpr}, {valueExpr});");
1037
writer.WriteLine($"{
WriterVarName
}.WritePropertyName({propertyNameExpr});");
1041
writer.WriteLine($"{typeSpec.TypeInfoPropertyName}{SerializeHandlerPropName}({
WriterVarName
}, {valueExpr});");
1045
writer.WriteLine($"{JsonSerializerTypeRef}.Serialize({
WriterVarName
}, {valueExpr}, {typeSpec.TypeInfoPropertyName});");