1 write to TypeRef
System.Text.Json.SourceGeneration (1)
JsonSourceGenerator.Parser.cs (1)
789TypeRef = typeRef,
40 references to TypeRef
System.Text.Json.SourceGeneration (40)
JsonSourceGenerator.Emitter.cs (38)
100_typeIndex.Add(spec.TypeRef, spec); 229string typeFQN = typeMetadata.TypeRef.FullyQualifiedName; 248string typeFQN = typeMetadata.TypeRef.FullyQualifiedName; 269string typeFQN = typeMetadata.TypeRef.FullyQualifiedName; 288string typeFQN = typeMetadata.TypeRef.FullyQualifiedName; 304string typeFQN = typeMetadata.TypeRef.FullyQualifiedName; 336string typeFQN = typeGenerationSpec.TypeRef.FullyQualifiedName; 435writer.WriteLine($"foreach ({valueTypeGenerationSpec.TypeRef.FullyQualifiedName} element in value.Span)"); 447writer.WriteLine($"foreach ({valueTypeGenerationSpec.TypeRef.FullyQualifiedName} element in value)"); 480writer.WriteLine($"foreach ({KeyValuePairTypeRef}<{keyType.FullyQualifiedName}, {valueTypeGenerationSpec.TypeRef.FullyQualifiedName}> entry in value)"); 531constructorInfoFactoryFunc = $"static () => typeof({typeMetadata.TypeRef.FullyQualifiedName}).GetConstructor(InstanceMemberBindingFlags, binder: null, {argTypes}, modifiers: null)"; 540string genericArg = typeMetadata.TypeRef.FullyQualifiedName; 562jsonTypeInfo = {{JsonMetadataServicesTypeRef}}.CreateObjectInfo<{{typeMetadata.TypeRef.FullyQualifiedName}}>(options, objectInfo); 619string genericArg = typeMetadata.TypeRef.FullyQualifiedName; 673if (!typeMetadata.TypeRef.IsValueType) 897string castExpr = typeGenerationSpec.TypeRef.IsValueType 937return typeGenerationSpec.TypeRef.IsValueType 965string castExpr = typeGenerationSpec.TypeRef.IsValueType 981string setterCastExpr = typeGenerationSpec.TypeRef.IsValueType 1036string refPrefix = typeGenerationSpec.TypeRef.IsValueType ? "ref " : ""; 1074if (typeGenerationSpec.TypeRef.IsValueType) 1096if (typeGenerationSpec.TypeRef.IsValueType) 1145string refPrefix = typeGenerationSpec.TypeRef.IsValueType ? "ref " : ""; 1275string typeFQN = typeSpec.TypeRef.FullyQualifiedName; 1346return typeGenSpec.TypeRef.IsValueType 1433string exceptionMessage = string.Format(ExceptionMessages.InvalidSerializablePropertyConfiguration, typeGenSpec.TypeRef.FullyQualifiedName); 1483string? objectExpr = propertyGenSpec.DeclaringType != typeGenSpec.TypeRef 1565throw new {{JsonExceptionTypeRef}}(string.Format("{{ExceptionMessages.PropertyGetterDisallowNull}}", propertyName, {{FormatStringLiteral(typeGenSpec.TypeRef.Name)}})); 1608sb.Append($"return new {typeGenerationSpec.TypeRef.FullyQualifiedName}("); 1619sb = new($"static args => new {typeGenerationSpec.TypeRef.FullyQualifiedName}("); 1681string valueTypeRef = typeGenSpec.TypeRef.IsValueType 1682? typeGenSpec.TypeRef.FullyQualifiedName 1683: typeGenSpec.TypeRef.FullyQualifiedName + "?"; 1694if (!skipNullCheck && typeGenSpec.TypeRef.CanBeNull) 1784string typeFQN = typeMetadata.TypeRef.FullyQualifiedName; 2139if (type == typeof({{metadata.TypeRef.FullyQualifiedName}})) 2261{ IsValueTuple: true } => $"() => default({typeSpec.TypeRef.FullyQualifiedName})", 2262{ ConstructionStrategy: ObjectConstructionStrategy.ParameterlessConstructor, ConstructorIsInaccessible: false } => $"() => new {typeSpec.TypeRef.FullyQualifiedName}()",
JsonSourceGenerator.Parser.cs (2)
176GeneratedTypes = _generatedTypes.Values.OrderBy(t => t.TypeRef.FullyQualifiedName).ToImmutableEquatableArray(), 234return spec.TypeRef;