1 write to TypeRef
System.Text.Json.SourceGeneration (1)
JsonSourceGenerator.Parser.cs (1)
653
TypeRef
= typeRef,
30 references to TypeRef
System.Text.Json.SourceGeneration (30)
JsonSourceGenerator.Emitter.cs (28)
108
_typeIndex.Add(spec.
TypeRef
, spec);
233
string typeFQN = typeMetadata.
TypeRef
.FullyQualifiedName;
252
string typeFQN = typeMetadata.
TypeRef
.FullyQualifiedName;
273
string typeFQN = typeMetadata.
TypeRef
.FullyQualifiedName;
292
string typeFQN = typeMetadata.
TypeRef
.FullyQualifiedName;
308
string typeFQN = typeMetadata.
TypeRef
.FullyQualifiedName;
340
string typeFQN = typeGenerationSpec.
TypeRef
.FullyQualifiedName;
433
writer.WriteLine($"foreach ({valueTypeGenerationSpec.
TypeRef
.FullyQualifiedName} {elementVarName} in {ValueVarName}.Span)");
445
writer.WriteLine($"foreach ({valueTypeGenerationSpec.
TypeRef
.FullyQualifiedName} {elementVarName} in {ValueVarName})");
478
writer.WriteLine($"foreach ({KeyValuePairTypeRef}<{keyType.FullyQualifiedName}, {valueTypeGenerationSpec.
TypeRef
.FullyQualifiedName}> entry in {ValueVarName})");
529
constructorInfoFactoryFunc = $"static () => typeof({typeMetadata.
TypeRef
.FullyQualifiedName}).GetConstructor({InstanceMemberBindingFlagsVariableName}, binder: null, {argTypes}, modifiers: null)";
539
string genericArg = typeMetadata.
TypeRef
.FullyQualifiedName;
554
{{JsonTypeInfoLocalVariableName}} = {{JsonMetadataServicesTypeRef}}.CreateObjectInfo<{{typeMetadata.
TypeRef
.FullyQualifiedName}}>({{OptionsLocalVariableName}}, {{ObjectInfoVarName}});
622
=> $"""static _ => throw new {InvalidOperationExceptionTypeRef}("{string.Format(ExceptionMessages.InaccessibleJsonIncludePropertiesNotSupported, typeGenerationSpec.
TypeRef
.Name, propertyName)}")""",
631
{ CanUseSetter: true } when typeGenerationSpec.
TypeRef
.IsValueType
636
=> $"""static (obj, value) => throw new {InvalidOperationExceptionTypeRef}("{string.Format(ExceptionMessages.InaccessibleJsonIncludePropertiesNotSupported, typeGenerationSpec.
TypeRef
.Name, property.MemberName)}")""",
782
string exceptionMessage = string.Format(ExceptionMessages.InvalidSerializablePropertyConfiguration, typeGenSpec.
TypeRef
.FullyQualifiedName);
830
string? objectExpr = propertyGenSpec.DeclaringType != typeGenSpec.
TypeRef
906
throw new {{JsonExceptionTypeRef}}(string.Format("{{ExceptionMessages.PropertyGetterDisallowNull}}", propertyName, {{FormatStringLiteral(typeGenSpec.
TypeRef
.Name)}}));
922
StringBuilder sb = new($"static {ArgsVarName} => new {typeGenerationSpec.
TypeRef
.FullyQualifiedName}(");
970
string valueTypeRef = typeGenSpec.
TypeRef
.IsValueType
971
? typeGenSpec.
TypeRef
.FullyQualifiedName
972
: typeGenSpec.
TypeRef
.FullyQualifiedName + "?";
983
if (!skipNullCheck && typeGenSpec.
TypeRef
.CanBeNull)
1071
string typeFQN = typeMetadata.
TypeRef
.FullyQualifiedName;
1405
if (type == typeof({{metadata.
TypeRef
.FullyQualifiedName}}))
1474
{ IsValueTuple: true } => $"() => default({typeSpec.
TypeRef
.FullyQualifiedName})",
1475
{ 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
;