1 write to TypeRef
System.Text.Json.SourceGeneration (1)
JsonSourceGenerator.Parser.cs (1)
891TypeRef = typeRef,
42 references to TypeRef
System.Text.Json.SourceGeneration (42)
JsonSourceGenerator.Emitter.cs (40)
108_typeIndex.Add(spec.TypeRef, spec); 285string typeFQN = typeMetadata.TypeRef.FullyQualifiedName; 304string typeFQN = typeMetadata.TypeRef.FullyQualifiedName; 325string typeFQN = typeMetadata.TypeRef.FullyQualifiedName; 344string typeFQN = typeMetadata.TypeRef.FullyQualifiedName; 360string typeFQN = typeMetadata.TypeRef.FullyQualifiedName; 392string typeFQN = typeGenerationSpec.TypeRef.FullyQualifiedName; 493writer.WriteLine($"foreach ({valueTypeGenerationSpec.TypeRef.FullyQualifiedName} element in value.Span)"); 505writer.WriteLine($"foreach ({valueTypeGenerationSpec.TypeRef.FullyQualifiedName} element in value)"); 538writer.WriteLine($"foreach ({KeyValuePairTypeRef}<{keyType.FullyQualifiedName}, {valueTypeGenerationSpec.TypeRef.FullyQualifiedName}> entry in value)"); 589constructorInfoFactoryFunc = $"static () => typeof({typeMetadata.TypeRef.FullyQualifiedName}).GetConstructor(InstanceMemberBindingFlags, binder: null, {argTypes}, modifiers: null)"; 598string genericArg = typeMetadata.TypeRef.FullyQualifiedName; 620jsonTypeInfo = {{JsonMetadataServicesTypeRef}}.CreateObjectInfo<{{typeMetadata.TypeRef.FullyQualifiedName}}>(options, objectInfo); 679string genericArg = typeMetadata.TypeRef.FullyQualifiedName; 747if (!typeMetadata.TypeRef.IsValueType) 1004string castExpr = typeGenerationSpec.TypeRef.IsValueType 1049return typeGenerationSpec.TypeRef.IsValueType 1078string castExpr = typeGenerationSpec.TypeRef.IsValueType 1099string setterCastExpr = typeGenerationSpec.TypeRef.IsValueType 1155string refPrefix = typeGenerationSpec.TypeRef.IsValueType ? "ref " : ""; 1193if (typeGenerationSpec.TypeRef.IsValueType) 1215if (typeGenerationSpec.TypeRef.IsValueType) 1264string refPrefix = typeGenerationSpec.TypeRef.IsValueType ? "ref " : ""; 1379string typeFQN = typeSpec.TypeRef.FullyQualifiedName; 1405string typeFQN = useGenericWrapper ? typeSpec.OpenDeclaringTypeFQN! : typeSpec.TypeRef.FullyQualifiedName; 1528return typeGenSpec.TypeRef.IsValueType 1615string exceptionMessage = string.Format(ExceptionMessages.InvalidSerializablePropertyConfiguration, typeGenSpec.TypeRef.FullyQualifiedName); 1665string? objectExpr = propertyGenSpec.DeclaringType != typeGenSpec.TypeRef 1747throw new {{JsonExceptionTypeRef}}(string.Format("{{ExceptionMessages.PropertyGetterDisallowNull}}", propertyName, {{FormatStringLiteral(typeGenSpec.TypeRef.Name)}})); 1790sb.Append($"return new {typeGenerationSpec.TypeRef.FullyQualifiedName}("); 1801sb = new($"static args => new {typeGenerationSpec.TypeRef.FullyQualifiedName}("); 1863string valueTypeRef = typeGenSpec.TypeRef.IsValueType 1864? typeGenSpec.TypeRef.FullyQualifiedName 1865: typeGenSpec.TypeRef.FullyQualifiedName + "?"; 1876if (!skipNullCheck && typeGenSpec.TypeRef.CanBeNull) 1977string typeFQN = typeMetadata.TypeRef.FullyQualifiedName; 2032throw new {{InvalidOperationExceptionTypeRef}}(string.Format("{{ExceptionMessages.ClosedTypeInferenceRequiresCompileTimeOptIn}}", typeof({{typeSpec.TypeRef.FullyQualifiedName}}))); 2374if (type == typeof({{metadata.TypeRef.FullyQualifiedName}})) 2496{ IsValueTuple: true } => $"() => default({typeSpec.TypeRef.FullyQualifiedName})", 2497{ ConstructionStrategy: ObjectConstructionStrategy.ParameterlessConstructor, ConstructorIsInaccessible: false } => $"() => new {typeSpec.TypeRef.FullyQualifiedName}()",
JsonSourceGenerator.Parser.cs (2)
183GeneratedTypes = _generatedTypes.Values.OrderBy(t => t.TypeRef.FullyQualifiedName).ToImmutableEquatableArray(), 206return spec.TypeRef;