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