2 writes to Type
System.Text.Json.SourceGeneration (2)
JsonSourceGenerator.Parser.cs (2)
240
Type
= type,
666
Type
= _knownSymbols.Compilation.EraseCompileTimeMetadata(typeSymbol),
22 references to Type
System.Text.Json.SourceGeneration (22)
JsonSourceGenerator.Parser.cs (22)
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
;
990
bool isUnionType = IsUnionType(typeToGenerate.
Type
);
991
INamedTypeSymbol? namedUnionType = typeToGenerate.
Type
as INamedTypeSymbol;
993
foreach (AttributeData attributeData in typeToGenerate.
Type
.GetAttributes())
1030
customConverterType = GetConverterTypeFromJsonConverterAttribute(contextType, typeToGenerate.
Type
, attributeData, ref experimentalIds);
1050
ReportDiagnostic(DiagnosticDescriptors.JsonIgnoreConditionAlwaysInvalidOnType, typeToGenerate.Location, typeToGenerate.
Type
.ToDisplayString());
1096
polymorphicClassifierFactoryType = GetTypeClassifierFactoryTypeFromAttribute(contextType, classifierType, typeToGenerate.
Type
, attributeData, ref experimentalIds);
1134
typeToGenerate.
Type
is INamedTypeSymbol closedBaseType &&
1182
unboundDerived, typeToGenerate.
Type
,
1189
ReportDiagnostic(DiagnosticDescriptors.OpenGenericDerivedTypeCouldNotBeResolved, derivedTypeDiagnosticLocation, derivedType.ToDisplayString(), typeToGenerate.
Type
.ToDisplayString(), failureReason);
1194
!typeToGenerate.
Type
.IsAssignableFrom(resolvedDerivedType))
1198
ReportDiagnostic(DiagnosticDescriptors.DerivedTypeIsNotSupported, derivedTypeDiagnosticLocation, resolvedDerivedType.ToDisplayString(), typeToGenerate.
Type
.ToDisplayString());
1207
!derivedType.IsAtLeastAsVisibleAs(typeToGenerate.
Type
))
1211
ReportDiagnostic(DiagnosticDescriptors.InferredDerivedTypeIsNotAccessible, derivedTypeDiagnosticLocation, derivedType.ToDisplayString(), typeToGenerate.
Type
.ToDisplayString());
1220
ReportDiagnostic(DiagnosticDescriptors.DerivedTypeDiscriminatorCollision, derivedTypeDiagnosticLocation, typeDiscriminator, typeToGenerate.
Type
.ToDisplayString());
1225
ReportDiagnostic(DiagnosticDescriptors.PolymorphismNotSupported, polymorphismDiagnosticLocation, typeToGenerate.
Type
.ToDisplayString());
1557
if (typeToGenerate.
Type
is not INamedTypeSymbol namedType)
2144
foreach (INamedTypeSymbol currentType in typeToGenerate.
Type
.GetSortedTypeHierarchy())
2745
ITypeSymbol type = typeToGenerate.
Type
;