1 write to TypeRef
System.Text.Json.SourceGeneration (1)
JsonSourceGenerator.Parser.cs (1)
789
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;
673
if (!typeMetadata.
TypeRef
.IsValueType)
897
string castExpr = typeGenerationSpec.
TypeRef
.IsValueType
937
return typeGenerationSpec.
TypeRef
.IsValueType
965
string castExpr = typeGenerationSpec.
TypeRef
.IsValueType
981
string setterCastExpr = typeGenerationSpec.
TypeRef
.IsValueType
1036
string refPrefix = typeGenerationSpec.
TypeRef
.IsValueType ? "ref " : "";
1074
if (typeGenerationSpec.
TypeRef
.IsValueType)
1096
if (typeGenerationSpec.
TypeRef
.IsValueType)
1145
string refPrefix = typeGenerationSpec.
TypeRef
.IsValueType ? "ref " : "";
1275
string typeFQN = typeSpec.
TypeRef
.FullyQualifiedName;
1346
return typeGenSpec.
TypeRef
.IsValueType
1433
string exceptionMessage = string.Format(ExceptionMessages.InvalidSerializablePropertyConfiguration, typeGenSpec.
TypeRef
.FullyQualifiedName);
1483
string? objectExpr = propertyGenSpec.DeclaringType != typeGenSpec.
TypeRef
1565
throw new {{JsonExceptionTypeRef}}(string.Format("{{ExceptionMessages.PropertyGetterDisallowNull}}", propertyName, {{FormatStringLiteral(typeGenSpec.
TypeRef
.Name)}}));
1608
sb.Append($"return new {typeGenerationSpec.
TypeRef
.FullyQualifiedName}(");
1619
sb = new($"static args => new {typeGenerationSpec.
TypeRef
.FullyQualifiedName}(");
1681
string valueTypeRef = typeGenSpec.
TypeRef
.IsValueType
1682
? typeGenSpec.
TypeRef
.FullyQualifiedName
1683
: typeGenSpec.
TypeRef
.FullyQualifiedName + "?";
1694
if (!skipNullCheck && typeGenSpec.
TypeRef
.CanBeNull)
1784
string typeFQN = typeMetadata.
TypeRef
.FullyQualifiedName;
2139
if (type == typeof({{metadata.
TypeRef
.FullyQualifiedName}}))
2261
{ IsValueTuple: true } => $"() => default({typeSpec.
TypeRef
.FullyQualifiedName})",
2262
{ ConstructionStrategy: ObjectConstructionStrategy.ParameterlessConstructor, ConstructorIsInaccessible: false } => $"() => new {typeSpec.
TypeRef
.FullyQualifiedName}()",
JsonSourceGenerator.Parser.cs (2)
176
GeneratedTypes = _generatedTypes.Values.OrderBy(t => t.
TypeRef
.FullyQualifiedName).ToImmutableEquatableArray(),
234
return spec.
TypeRef
;