1 write to TypeRef
System.Text.Json.SourceGeneration (1)
JsonSourceGenerator.Parser.cs (1)
629TypeRef = typeRef,
28 references to TypeRef
System.Text.Json.SourceGeneration (28)
JsonSourceGenerator.Emitter.cs (26)
102_typeIndex.Add(spec.TypeRef, spec); 227string typeFQN = typeMetadata.TypeRef.FullyQualifiedName; 246string typeFQN = typeMetadata.TypeRef.FullyQualifiedName; 267string typeFQN = typeMetadata.TypeRef.FullyQualifiedName; 286string typeFQN = typeMetadata.TypeRef.FullyQualifiedName; 302string typeFQN = typeMetadata.TypeRef.FullyQualifiedName; 334string typeFQN = typeGenerationSpec.TypeRef.FullyQualifiedName; 427writer.WriteLine($"foreach ({valueTypeGenerationSpec.TypeRef.FullyQualifiedName} {elementVarName} in {ValueVarName}.Span)"); 439writer.WriteLine($"foreach ({valueTypeGenerationSpec.TypeRef.FullyQualifiedName} {elementVarName} in {ValueVarName})"); 472writer.WriteLine($"foreach ({KeyValuePairTypeRef}<{keyType.FullyQualifiedName}, {valueTypeGenerationSpec.TypeRef.FullyQualifiedName}> entry in {ValueVarName})"); 522string genericArg = typeMetadata.TypeRef.FullyQualifiedName; 536{{JsonTypeInfoLocalVariableName}} = {{JsonMetadataServicesTypeRef}}.CreateObjectInfo<{{typeMetadata.TypeRef.FullyQualifiedName}}>({{OptionsLocalVariableName}}, {{ObjectInfoVarName}}); 604=> $"""static _ => throw new {InvalidOperationExceptionTypeRef}("{string.Format(ExceptionMessages.InaccessibleJsonIncludePropertiesNotSupported, typeGenerationSpec.TypeRef.Name, propertyName)}")""", 613{ CanUseSetter: true } when typeGenerationSpec.TypeRef.IsValueType 618=> $"""static (obj, value) => throw new {InvalidOperationExceptionTypeRef}("{string.Format(ExceptionMessages.InaccessibleJsonIncludePropertiesNotSupported, typeGenerationSpec.TypeRef.Name, property.MemberName)}")""", 745string exceptionMessage = string.Format(ExceptionMessages.InvalidSerializablePropertyConfiguration, typeGenSpec.TypeRef.FullyQualifiedName); 791string? objectExpr = propertyGenSpec.DeclaringType != typeGenSpec.TypeRef 853StringBuilder sb = new($"static {ArgsVarName} => new {typeGenerationSpec.TypeRef.FullyQualifiedName}("); 901string valueTypeRef = typeGenSpec.TypeRef.IsValueType 902? typeGenSpec.TypeRef.FullyQualifiedName 903: typeGenSpec.TypeRef.FullyQualifiedName + "?"; 914if (!skipNullCheck && typeGenSpec.TypeRef.CanBeNull) 1000string typeFQN = typeMetadata.TypeRef.FullyQualifiedName; 1304if (type == typeof({{metadata.TypeRef.FullyQualifiedName}})) 1373{ IsValueTuple: true } => $"() => default({typeSpec.TypeRef.FullyQualifiedName})", 1374{ ConstructionStrategy: ObjectConstructionStrategy.ParameterlessConstructor } => $"() => new {typeSpec.TypeRef.FullyQualifiedName}()",
JsonSourceGenerator.Parser.cs (2)
156GeneratedTypes = _generatedTypes.Values.OrderBy(t => t.TypeRef.FullyQualifiedName).ToImmutableEquatableArray(), 214return spec.TypeRef;