2 writes to Type
System.Text.Json.SourceGeneration (2)
JsonSourceGenerator.Parser.cs (2)
240
Type
= type,
666
Type
= _knownSymbols.Compilation.EraseCompileTimeMetadata(typeSymbol),
24 references to Type
System.Text.Json.SourceGeneration (24)
JsonSourceGenerator.Parser.cs (24)
165
if (!_generatedTypes.ContainsKey(typeToGenerate.
Type
))
168
_generatedTypes.Add(typeToGenerate.
Type
, spec);
676
Debug.Assert(IsSymbolAccessibleWithin(typeToGenerate.
Type
, within: contextType), "should not generate metadata for inaccessible types.");
678
ITypeSymbol type = typeToGenerate.
Type
;
996
bool isUnionType = IsUnionType(typeToGenerate.
Type
);
997
INamedTypeSymbol? namedUnionType = typeToGenerate.
Type
as INamedTypeSymbol;
999
foreach (AttributeData attributeData in typeToGenerate.
Type
.GetAttributes())
1036
customConverterType = GetConverterTypeFromJsonConverterAttribute(contextType, typeToGenerate.
Type
, attributeData, ref experimentalIds);
1056
ReportDiagnostic(DiagnosticDescriptors.JsonIgnoreConditionAlwaysInvalidOnType, typeToGenerate.Location, typeToGenerate.
Type
.ToDisplayString());
1106
polymorphicClassifierFactoryType = GetTypeClassifierFactoryTypeFromAttribute(contextType, classifierType, typeToGenerate.
Type
, attributeData, ref experimentalIds);
1149
typeToGenerate.
Type
is INamedTypeSymbol namedBaseType &&
1163
typeToGenerate.
Type
.ToDisplayString());
1174
typeToGenerate.
Type
.ToDisplayString());
1240
unboundDerived, typeToGenerate.
Type
,
1247
ReportDiagnostic(DiagnosticDescriptors.OpenGenericDerivedTypeCouldNotBeResolved, derivedTypeDiagnosticLocation, derivedType.ToDisplayString(), typeToGenerate.
Type
.ToDisplayString(), failureReason);
1252
!typeToGenerate.
Type
.IsAssignableFrom(resolvedDerivedType))
1256
ReportDiagnostic(DiagnosticDescriptors.DerivedTypeIsNotSupported, derivedTypeDiagnosticLocation, resolvedDerivedType.ToDisplayString(), typeToGenerate.
Type
.ToDisplayString());
1265
!derivedType.IsAtLeastAsVisibleAs(typeToGenerate.
Type
))
1269
ReportDiagnostic(DiagnosticDescriptors.InferredDerivedTypeIsNotAccessible, derivedTypeDiagnosticLocation, derivedType.ToDisplayString(), typeToGenerate.
Type
.ToDisplayString());
1278
ReportDiagnostic(DiagnosticDescriptors.DerivedTypeDiscriminatorCollision, derivedTypeDiagnosticLocation, typeDiscriminator, typeToGenerate.
Type
.ToDisplayString());
1283
ReportDiagnostic(DiagnosticDescriptors.PolymorphismNotSupported, polymorphismDiagnosticLocation, typeToGenerate.
Type
.ToDisplayString());
1615
if (typeToGenerate.
Type
is not INamedTypeSymbol namedType)
2206
foreach (INamedTypeSymbol currentType in typeToGenerate.
Type
.GetSortedTypeHierarchy())
2807
ITypeSymbol type = typeToGenerate.
Type
;