1 write to TypeRef
System.Text.Json.SourceGeneration (1)
JsonSourceGenerator.Parser.cs (1)
910TypeRef = typeRef,
41 references to TypeRef
System.Text.Json.SourceGeneration (41)
JsonSourceGenerator.Emitter.cs (39)
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; 746if (!typeMetadata.TypeRef.IsValueType) 994string castExpr = typeGenerationSpec.TypeRef.IsValueType 1034return typeGenerationSpec.TypeRef.IsValueType 1062string castExpr = typeGenerationSpec.TypeRef.IsValueType 1078string setterCastExpr = typeGenerationSpec.TypeRef.IsValueType 1133string refPrefix = typeGenerationSpec.TypeRef.IsValueType ? "ref " : ""; 1171if (typeGenerationSpec.TypeRef.IsValueType) 1193if (typeGenerationSpec.TypeRef.IsValueType) 1242string refPrefix = typeGenerationSpec.TypeRef.IsValueType ? "ref " : ""; 1372string typeFQN = typeSpec.TypeRef.FullyQualifiedName; 1443return typeGenSpec.TypeRef.IsValueType 1530string exceptionMessage = string.Format(ExceptionMessages.InvalidSerializablePropertyConfiguration, typeGenSpec.TypeRef.FullyQualifiedName); 1580string? objectExpr = propertyGenSpec.DeclaringType != typeGenSpec.TypeRef 1662throw new {{JsonExceptionTypeRef}}(string.Format("{{ExceptionMessages.PropertyGetterDisallowNull}}", propertyName, {{FormatStringLiteral(typeGenSpec.TypeRef.Name)}})); 1705sb.Append($"return new {typeGenerationSpec.TypeRef.FullyQualifiedName}("); 1716sb = new($"static args => new {typeGenerationSpec.TypeRef.FullyQualifiedName}("); 1778string valueTypeRef = typeGenSpec.TypeRef.IsValueType 1779? typeGenSpec.TypeRef.FullyQualifiedName 1780: typeGenSpec.TypeRef.FullyQualifiedName + "?"; 1791if (!skipNullCheck && typeGenSpec.TypeRef.CanBeNull) 1892string typeFQN = typeMetadata.TypeRef.FullyQualifiedName; 1947throw new {{InvalidOperationExceptionTypeRef}}(string.Format("{{ExceptionMessages.ClosedTypeInferenceRequiresCompileTimeOptIn}}", typeof({{typeSpec.TypeRef.FullyQualifiedName}}))); 2289if (type == typeof({{metadata.TypeRef.FullyQualifiedName}})) 2411{ IsValueTuple: true } => $"() => default({typeSpec.TypeRef.FullyQualifiedName})", 2412{ 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;