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