1 write to TypeRef
System.Text.Json.SourceGeneration (1)
JsonSourceGenerator.Parser.cs (1)
914TypeRef = 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; 748if (!typeMetadata.TypeRef.IsValueType) 1006string castExpr = typeGenerationSpec.TypeRef.IsValueType 1046return typeGenerationSpec.TypeRef.IsValueType 1074string castExpr = typeGenerationSpec.TypeRef.IsValueType 1090string setterCastExpr = typeGenerationSpec.TypeRef.IsValueType 1145string refPrefix = typeGenerationSpec.TypeRef.IsValueType ? "ref " : ""; 1183if (typeGenerationSpec.TypeRef.IsValueType) 1205if (typeGenerationSpec.TypeRef.IsValueType) 1254string refPrefix = typeGenerationSpec.TypeRef.IsValueType ? "ref " : ""; 1384string typeFQN = typeSpec.TypeRef.FullyQualifiedName; 1455return typeGenSpec.TypeRef.IsValueType 1542string exceptionMessage = string.Format(ExceptionMessages.InvalidSerializablePropertyConfiguration, typeGenSpec.TypeRef.FullyQualifiedName); 1592string? objectExpr = propertyGenSpec.DeclaringType != typeGenSpec.TypeRef 1674throw new {{JsonExceptionTypeRef}}(string.Format("{{ExceptionMessages.PropertyGetterDisallowNull}}", propertyName, {{FormatStringLiteral(typeGenSpec.TypeRef.Name)}})); 1717sb.Append($"return new {typeGenerationSpec.TypeRef.FullyQualifiedName}("); 1728sb = new($"static args => new {typeGenerationSpec.TypeRef.FullyQualifiedName}("); 1790string valueTypeRef = typeGenSpec.TypeRef.IsValueType 1791? typeGenSpec.TypeRef.FullyQualifiedName 1792: typeGenSpec.TypeRef.FullyQualifiedName + "?"; 1803if (!skipNullCheck && typeGenSpec.TypeRef.CanBeNull) 1904string typeFQN = typeMetadata.TypeRef.FullyQualifiedName; 1959throw new {{InvalidOperationExceptionTypeRef}}(string.Format("{{ExceptionMessages.ClosedTypeInferenceRequiresCompileTimeOptIn}}", typeof({{typeSpec.TypeRef.FullyQualifiedName}}))); 2301if (type == typeof({{metadata.TypeRef.FullyQualifiedName}})) 2423{ IsValueTuple: true } => $"() => default({typeSpec.TypeRef.FullyQualifiedName})", 2424{ 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;