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