1 write to TypeRef
System.Text.Json.SourceGeneration (1)
JsonSourceGenerator.Parser.cs (1)
718
TypeRef
= typeRef,
31 references to TypeRef
System.Text.Json.SourceGeneration (31)
JsonSourceGenerator.Emitter.cs (29)
109
_typeIndex.Add(spec.
TypeRef
, spec);
234
string typeFQN = typeMetadata.
TypeRef
.FullyQualifiedName;
253
string typeFQN = typeMetadata.
TypeRef
.FullyQualifiedName;
274
string typeFQN = typeMetadata.
TypeRef
.FullyQualifiedName;
293
string typeFQN = typeMetadata.
TypeRef
.FullyQualifiedName;
309
string typeFQN = typeMetadata.
TypeRef
.FullyQualifiedName;
341
string typeFQN = typeGenerationSpec.
TypeRef
.FullyQualifiedName;
434
writer.WriteLine($"foreach ({valueTypeGenerationSpec.
TypeRef
.FullyQualifiedName} {elementVarName} in {ValueVarName}.Span)");
446
writer.WriteLine($"foreach ({valueTypeGenerationSpec.
TypeRef
.FullyQualifiedName} {elementVarName} in {ValueVarName})");
479
writer.WriteLine($"foreach ({KeyValuePairTypeRef}<{keyType.FullyQualifiedName}, {valueTypeGenerationSpec.
TypeRef
.FullyQualifiedName}> entry in {ValueVarName})");
530
constructorInfoFactoryFunc = $"static () => typeof({typeMetadata.
TypeRef
.FullyQualifiedName}).GetConstructor({InstanceMemberBindingFlagsVariableName}, binder: null, {argTypes}, modifiers: null)";
540
string genericArg = typeMetadata.
TypeRef
.FullyQualifiedName;
555
{{JsonTypeInfoLocalVariableName}} = {{JsonMetadataServicesTypeRef}}.CreateObjectInfo<{{typeMetadata.
TypeRef
.FullyQualifiedName}}>({{OptionsLocalVariableName}}, {{ObjectInfoVarName}});
633
=> $"""static _ => throw new {InvalidOperationExceptionTypeRef}("{string.Format(ExceptionMessages.InaccessibleJsonIncludePropertiesNotSupported, typeGenerationSpec.
TypeRef
.Name, propertyName)}")""",
642
{ CanUseSetter: true } when typeGenerationSpec.
TypeRef
.IsValueType
647
=> $"""static (obj, value) => throw new {InvalidOperationExceptionTypeRef}("{string.Format(ExceptionMessages.InaccessibleJsonIncludePropertiesNotSupported, typeGenerationSpec.
TypeRef
.Name, property.MemberName)}")""",
806
string exceptionMessage = string.Format(ExceptionMessages.InvalidSerializablePropertyConfiguration, typeGenSpec.
TypeRef
.FullyQualifiedName);
854
string? objectExpr = propertyGenSpec.DeclaringType != typeGenSpec.
TypeRef
933
throw new {{JsonExceptionTypeRef}}(string.Format("{{ExceptionMessages.PropertyGetterDisallowNull}}", propertyName, {{FormatStringLiteral(typeGenSpec.
TypeRef
.Name)}}));
971
sb.Append($"return new {typeGenerationSpec.
TypeRef
.FullyQualifiedName}(");
975
sb = new($"static {ArgsVarName} => new {typeGenerationSpec.
TypeRef
.FullyQualifiedName}(");
1037
string valueTypeRef = typeGenSpec.
TypeRef
.IsValueType
1038
? typeGenSpec.
TypeRef
.FullyQualifiedName
1039
: typeGenSpec.
TypeRef
.FullyQualifiedName + "?";
1050
if (!skipNullCheck && typeGenSpec.
TypeRef
.CanBeNull)
1140
string typeFQN = typeMetadata.
TypeRef
.FullyQualifiedName;
1477
if (type == typeof({{metadata.
TypeRef
.FullyQualifiedName}}))
1546
{ IsValueTuple: true } => $"() => default({typeSpec.
TypeRef
.FullyQualifiedName})",
1547
{ ConstructionStrategy: ObjectConstructionStrategy.ParameterlessConstructor } => $"() => new {typeSpec.
TypeRef
.FullyQualifiedName}()",
JsonSourceGenerator.Parser.cs (2)
165
GeneratedTypes = _generatedTypes.Values.OrderBy(t => t.
TypeRef
.FullyQualifiedName).ToImmutableEquatableArray(),
223
return spec.
TypeRef
;