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