1 write to TypeRef
System.Text.Json.SourceGeneration (1)
JsonSourceGenerator.Parser.cs (1)
729
TypeRef
= typeRef,
38 references to TypeRef
System.Text.Json.SourceGeneration (38)
JsonSourceGenerator.Emitter.cs (36)
119
_typeIndex.Add(spec.
TypeRef
, spec);
245
string typeFQN = typeMetadata.
TypeRef
.FullyQualifiedName;
264
string typeFQN = typeMetadata.
TypeRef
.FullyQualifiedName;
285
string typeFQN = typeMetadata.
TypeRef
.FullyQualifiedName;
304
string typeFQN = typeMetadata.
TypeRef
.FullyQualifiedName;
320
string typeFQN = typeMetadata.
TypeRef
.FullyQualifiedName;
352
string typeFQN = typeGenerationSpec.
TypeRef
.FullyQualifiedName;
445
writer.WriteLine($"foreach ({valueTypeGenerationSpec.
TypeRef
.FullyQualifiedName} {elementVarName} in {ValueVarName}.Span)");
457
writer.WriteLine($"foreach ({valueTypeGenerationSpec.
TypeRef
.FullyQualifiedName} {elementVarName} in {ValueVarName})");
490
writer.WriteLine($"foreach ({KeyValuePairTypeRef}<{keyType.FullyQualifiedName}, {valueTypeGenerationSpec.
TypeRef
.FullyQualifiedName}> entry in {ValueVarName})");
541
constructorInfoFactoryFunc = $"static () => typeof({typeMetadata.
TypeRef
.FullyQualifiedName}).GetConstructor({InstanceMemberBindingFlagsVariableName}, binder: null, {argTypes}, modifiers: null)";
551
string genericArg = typeMetadata.
TypeRef
.FullyQualifiedName;
566
{{JsonTypeInfoLocalVariableName}} = {{JsonMetadataServicesTypeRef}}.CreateObjectInfo<{{typeMetadata.
TypeRef
.FullyQualifiedName}}>({{OptionsLocalVariableName}}, {{ObjectInfoVarName}});
785
string castExpr = typeGenerationSpec.
TypeRef
.IsValueType
825
return typeGenerationSpec.
TypeRef
.IsValueType
853
string castExpr = typeGenerationSpec.
TypeRef
.IsValueType
869
string setterCastExpr = typeGenerationSpec.
TypeRef
.IsValueType
924
string refPrefix = typeGenerationSpec.
TypeRef
.IsValueType ? "ref " : "";
962
if (typeGenerationSpec.
TypeRef
.IsValueType)
984
if (typeGenerationSpec.
TypeRef
.IsValueType)
1033
string refPrefix = typeGenerationSpec.
TypeRef
.IsValueType ? "ref " : "";
1163
string typeFQN = typeSpec.
TypeRef
.FullyQualifiedName;
1234
return typeGenSpec.
TypeRef
.IsValueType
1321
string exceptionMessage = string.Format(ExceptionMessages.InvalidSerializablePropertyConfiguration, typeGenSpec.
TypeRef
.FullyQualifiedName);
1371
string? objectExpr = propertyGenSpec.DeclaringType != typeGenSpec.
TypeRef
1453
throw new {{JsonExceptionTypeRef}}(string.Format("{{ExceptionMessages.PropertyGetterDisallowNull}}", propertyName, {{FormatStringLiteral(typeGenSpec.
TypeRef
.Name)}}));
1498
sb.Append($"return new {typeGenerationSpec.
TypeRef
.FullyQualifiedName}(");
1509
sb = new($"static {ArgsVarName} => new {typeGenerationSpec.
TypeRef
.FullyQualifiedName}(");
1571
string valueTypeRef = typeGenSpec.
TypeRef
.IsValueType
1572
? typeGenSpec.
TypeRef
.FullyQualifiedName
1573
: typeGenSpec.
TypeRef
.FullyQualifiedName + "?";
1584
if (!skipNullCheck && typeGenSpec.
TypeRef
.CanBeNull)
1674
string typeFQN = typeMetadata.
TypeRef
.FullyQualifiedName;
2018
if (type == typeof({{metadata.
TypeRef
.FullyQualifiedName}}))
2087
{ IsValueTuple: true } => $"() => default({typeSpec.
TypeRef
.FullyQualifiedName})",
2088
{ ConstructionStrategy: ObjectConstructionStrategy.ParameterlessConstructor, ConstructorIsInaccessible: false } => $"() => new {typeSpec.
TypeRef
.FullyQualifiedName}()",
JsonSourceGenerator.Parser.cs (2)
174
GeneratedTypes = _generatedTypes.Values.OrderBy(t => t.
TypeRef
.FullyQualifiedName).ToImmutableEquatableArray(),
232
return spec.
TypeRef
;