1 write to TypeRef
System.Text.Json.SourceGeneration (1)
JsonSourceGenerator.Parser.cs (1)
659
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}});
632
=> $"""static _ => throw new {InvalidOperationExceptionTypeRef}("{string.Format(ExceptionMessages.InaccessibleJsonIncludePropertiesNotSupported, typeGenerationSpec.
TypeRef
.Name, propertyName)}")""",
641
{ CanUseSetter: true } when typeGenerationSpec.
TypeRef
.IsValueType
646
=> $"""static (obj, value) => throw new {InvalidOperationExceptionTypeRef}("{string.Format(ExceptionMessages.InaccessibleJsonIncludePropertiesNotSupported, typeGenerationSpec.
TypeRef
.Name, property.MemberName)}")""",
795
string exceptionMessage = string.Format(ExceptionMessages.InvalidSerializablePropertyConfiguration, typeGenSpec.
TypeRef
.FullyQualifiedName);
843
string? objectExpr = propertyGenSpec.DeclaringType != typeGenSpec.
TypeRef
922
throw new {{JsonExceptionTypeRef}}(string.Format("{{ExceptionMessages.PropertyGetterDisallowNull}}", propertyName, {{FormatStringLiteral(typeGenSpec.
TypeRef
.Name)}}));
938
StringBuilder sb = new($"static {ArgsVarName} => new {typeGenerationSpec.
TypeRef
.FullyQualifiedName}(");
986
string valueTypeRef = typeGenSpec.
TypeRef
.IsValueType
987
? typeGenSpec.
TypeRef
.FullyQualifiedName
988
: typeGenSpec.
TypeRef
.FullyQualifiedName + "?";
999
if (!skipNullCheck && typeGenSpec.
TypeRef
.CanBeNull)
1089
string typeFQN = typeMetadata.
TypeRef
.FullyQualifiedName;
1426
if (type == typeof({{metadata.
TypeRef
.FullyQualifiedName}}))
1495
{ IsValueTuple: true } => $"() => default({typeSpec.
TypeRef
.FullyQualifiedName})",
1496
{ 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
;