1 write to TypeRef
System.Text.Json.SourceGeneration (1)
JsonSourceGenerator.Parser.cs (1)
806
TypeRef
= typeRef,
40 references to TypeRef
System.Text.Json.SourceGeneration (40)
JsonSourceGenerator.Emitter.cs (38)
108
_typeIndex.Add(spec.
TypeRef
, spec);
238
string typeFQN = typeMetadata.
TypeRef
.FullyQualifiedName;
257
string typeFQN = typeMetadata.
TypeRef
.FullyQualifiedName;
278
string typeFQN = typeMetadata.
TypeRef
.FullyQualifiedName;
297
string typeFQN = typeMetadata.
TypeRef
.FullyQualifiedName;
313
string typeFQN = typeMetadata.
TypeRef
.FullyQualifiedName;
345
string typeFQN = typeGenerationSpec.
TypeRef
.FullyQualifiedName;
444
writer.WriteLine($"foreach ({valueTypeGenerationSpec.
TypeRef
.FullyQualifiedName} element in value.Span)");
456
writer.WriteLine($"foreach ({valueTypeGenerationSpec.
TypeRef
.FullyQualifiedName} element in value)");
489
writer.WriteLine($"foreach ({KeyValuePairTypeRef}<{keyType.FullyQualifiedName}, {valueTypeGenerationSpec.
TypeRef
.FullyQualifiedName}> entry in value)");
540
constructorInfoFactoryFunc = $"static () => typeof({typeMetadata.
TypeRef
.FullyQualifiedName}).GetConstructor(InstanceMemberBindingFlags, binder: null, {argTypes}, modifiers: null)";
549
string genericArg = typeMetadata.
TypeRef
.FullyQualifiedName;
571
jsonTypeInfo = {{JsonMetadataServicesTypeRef}}.CreateObjectInfo<{{typeMetadata.
TypeRef
.FullyQualifiedName}}>(options, objectInfo);
628
string genericArg = typeMetadata.
TypeRef
.FullyQualifiedName;
724
if (!typeMetadata.
TypeRef
.IsValueType)
977
string castExpr = typeGenerationSpec.
TypeRef
.IsValueType
1017
return typeGenerationSpec.
TypeRef
.IsValueType
1045
string castExpr = typeGenerationSpec.
TypeRef
.IsValueType
1061
string setterCastExpr = typeGenerationSpec.
TypeRef
.IsValueType
1116
string refPrefix = typeGenerationSpec.
TypeRef
.IsValueType ? "ref " : "";
1154
if (typeGenerationSpec.
TypeRef
.IsValueType)
1176
if (typeGenerationSpec.
TypeRef
.IsValueType)
1225
string refPrefix = typeGenerationSpec.
TypeRef
.IsValueType ? "ref " : "";
1355
string typeFQN = typeSpec.
TypeRef
.FullyQualifiedName;
1426
return typeGenSpec.
TypeRef
.IsValueType
1513
string exceptionMessage = string.Format(ExceptionMessages.InvalidSerializablePropertyConfiguration, typeGenSpec.
TypeRef
.FullyQualifiedName);
1563
string? objectExpr = propertyGenSpec.DeclaringType != typeGenSpec.
TypeRef
1645
throw new {{JsonExceptionTypeRef}}(string.Format("{{ExceptionMessages.PropertyGetterDisallowNull}}", propertyName, {{FormatStringLiteral(typeGenSpec.
TypeRef
.Name)}}));
1688
sb.Append($"return new {typeGenerationSpec.
TypeRef
.FullyQualifiedName}(");
1699
sb = new($"static args => new {typeGenerationSpec.
TypeRef
.FullyQualifiedName}(");
1761
string valueTypeRef = typeGenSpec.
TypeRef
.IsValueType
1762
? typeGenSpec.
TypeRef
.FullyQualifiedName
1763
: typeGenSpec.
TypeRef
.FullyQualifiedName + "?";
1774
if (!skipNullCheck && typeGenSpec.
TypeRef
.CanBeNull)
1875
string typeFQN = typeMetadata.
TypeRef
.FullyQualifiedName;
2248
if (type == typeof({{metadata.
TypeRef
.FullyQualifiedName}}))
2370
{ IsValueTuple: true } => $"() => default({typeSpec.
TypeRef
.FullyQualifiedName})",
2371
{ ConstructionStrategy: ObjectConstructionStrategy.ParameterlessConstructor, ConstructorIsInaccessible: false } => $"() => new {typeSpec.
TypeRef
.FullyQualifiedName}()",
JsonSourceGenerator.Parser.cs (2)
177
GeneratedTypes = _generatedTypes.Values.OrderBy(t => t.
TypeRef
.FullyQualifiedName).ToImmutableEquatableArray(),
235
return spec.
TypeRef
;