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