1 write to TypeRef
System.Text.Json.SourceGeneration (1)
JsonSourceGenerator.Parser.cs (1)
806
TypeRef
= typeRef,
40 references to TypeRef
System.Text.Json.SourceGeneration (40)
JsonSourceGenerator.Emitter.cs (38)
100
_typeIndex.Add(spec.
TypeRef
, spec);
229
string typeFQN = typeMetadata.
TypeRef
.FullyQualifiedName;
248
string typeFQN = typeMetadata.
TypeRef
.FullyQualifiedName;
269
string typeFQN = typeMetadata.
TypeRef
.FullyQualifiedName;
288
string typeFQN = typeMetadata.
TypeRef
.FullyQualifiedName;
304
string typeFQN = typeMetadata.
TypeRef
.FullyQualifiedName;
336
string typeFQN = typeGenerationSpec.
TypeRef
.FullyQualifiedName;
435
writer.WriteLine($"foreach ({valueTypeGenerationSpec.
TypeRef
.FullyQualifiedName} element in value.Span)");
447
writer.WriteLine($"foreach ({valueTypeGenerationSpec.
TypeRef
.FullyQualifiedName} element in value)");
480
writer.WriteLine($"foreach ({KeyValuePairTypeRef}<{keyType.FullyQualifiedName}, {valueTypeGenerationSpec.
TypeRef
.FullyQualifiedName}> entry in value)");
531
constructorInfoFactoryFunc = $"static () => typeof({typeMetadata.
TypeRef
.FullyQualifiedName}).GetConstructor(InstanceMemberBindingFlags, binder: null, {argTypes}, modifiers: null)";
540
string genericArg = typeMetadata.
TypeRef
.FullyQualifiedName;
562
jsonTypeInfo = {{JsonMetadataServicesTypeRef}}.CreateObjectInfo<{{typeMetadata.
TypeRef
.FullyQualifiedName}}>(options, objectInfo);
619
string genericArg = typeMetadata.
TypeRef
.FullyQualifiedName;
715
if (!typeMetadata.
TypeRef
.IsValueType)
968
string castExpr = typeGenerationSpec.
TypeRef
.IsValueType
1008
return typeGenerationSpec.
TypeRef
.IsValueType
1036
string castExpr = typeGenerationSpec.
TypeRef
.IsValueType
1052
string setterCastExpr = typeGenerationSpec.
TypeRef
.IsValueType
1107
string refPrefix = typeGenerationSpec.
TypeRef
.IsValueType ? "ref " : "";
1145
if (typeGenerationSpec.
TypeRef
.IsValueType)
1167
if (typeGenerationSpec.
TypeRef
.IsValueType)
1216
string refPrefix = typeGenerationSpec.
TypeRef
.IsValueType ? "ref " : "";
1346
string typeFQN = typeSpec.
TypeRef
.FullyQualifiedName;
1417
return typeGenSpec.
TypeRef
.IsValueType
1504
string exceptionMessage = string.Format(ExceptionMessages.InvalidSerializablePropertyConfiguration, typeGenSpec.
TypeRef
.FullyQualifiedName);
1554
string? objectExpr = propertyGenSpec.DeclaringType != typeGenSpec.
TypeRef
1636
throw new {{JsonExceptionTypeRef}}(string.Format("{{ExceptionMessages.PropertyGetterDisallowNull}}", propertyName, {{FormatStringLiteral(typeGenSpec.
TypeRef
.Name)}}));
1679
sb.Append($"return new {typeGenerationSpec.
TypeRef
.FullyQualifiedName}(");
1690
sb = new($"static args => new {typeGenerationSpec.
TypeRef
.FullyQualifiedName}(");
1752
string valueTypeRef = typeGenSpec.
TypeRef
.IsValueType
1753
? typeGenSpec.
TypeRef
.FullyQualifiedName
1754
: typeGenSpec.
TypeRef
.FullyQualifiedName + "?";
1765
if (!skipNullCheck && typeGenSpec.
TypeRef
.CanBeNull)
1855
string typeFQN = typeMetadata.
TypeRef
.FullyQualifiedName;
2210
if (type == typeof({{metadata.
TypeRef
.FullyQualifiedName}}))
2332
{ IsValueTuple: true } => $"() => default({typeSpec.
TypeRef
.FullyQualifiedName})",
2333
{ 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
;