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