2 writes to Type
System.Text.Json.SourceGeneration (2)
JsonSourceGenerator.Parser.cs (2)
211Type = type, 637Type = _knownSymbols.Compilation.EraseCompileTimeMetadata(typeSymbol),
24 references to Type
System.Text.Json.SourceGeneration (24)
JsonSourceGenerator.Parser.cs (24)
171if (!_generatedTypes.ContainsKey(typeToGenerate.Type)) 174_generatedTypes.Add(typeToGenerate.Type, spec); 647Debug.Assert(IsSymbolAccessibleWithin(typeToGenerate.Type, within: contextType), "should not generate metadata for inaccessible types."); 649ITypeSymbol type = typeToGenerate.Type; 976bool isUnionType = IsUnionType(typeToGenerate.Type); 977INamedTypeSymbol? namedUnionType = typeToGenerate.Type as INamedTypeSymbol; 979foreach (AttributeData attributeData in typeToGenerate.Type.GetAttributes()) 1016customConverterType = GetConverterTypeFromJsonConverterAttribute(contextType, typeToGenerate.Type, attributeData, ref experimentalIds); 1036ReportDiagnostic(DiagnosticDescriptors.JsonIgnoreConditionAlwaysInvalidOnType, typeToGenerate.Location, typeToGenerate.Type.ToDisplayString()); 1086polymorphicClassifierFactoryType = GetTypeClassifierFactoryTypeFromAttribute(contextType, classifierType, typeToGenerate.Type, attributeData, ref experimentalIds); 1129typeToGenerate.Type is INamedTypeSymbol namedBaseType && 1143typeToGenerate.Type.ToDisplayString()); 1154typeToGenerate.Type.ToDisplayString()); 1222unboundDerived, typeToGenerate.Type, 1229ReportDiagnostic(DiagnosticDescriptors.OpenGenericDerivedTypeCouldNotBeResolved, derivedTypeDiagnosticLocation, derivedType.ToDisplayString(), typeToGenerate.Type.ToDisplayString(), failureReason); 1234!typeToGenerate.Type.IsAssignableFrom(resolvedDerivedType)) 1238ReportDiagnostic(DiagnosticDescriptors.DerivedTypeIsNotSupported, derivedTypeDiagnosticLocation, resolvedDerivedType.ToDisplayString(), typeToGenerate.Type.ToDisplayString()); 1247!derivedType.IsAtLeastAsVisibleAs(typeToGenerate.Type)) 1251ReportDiagnostic(DiagnosticDescriptors.InferredDerivedTypeIsNotAccessible, derivedTypeDiagnosticLocation, derivedType.ToDisplayString(), typeToGenerate.Type.ToDisplayString()); 1260ReportDiagnostic(DiagnosticDescriptors.DerivedTypeDiscriminatorCollision, derivedTypeDiagnosticLocation, typeDiscriminator, typeToGenerate.Type.ToDisplayString()); 1265ReportDiagnostic(DiagnosticDescriptors.PolymorphismNotSupported, polymorphismDiagnosticLocation, typeToGenerate.Type.ToDisplayString()); 1597if (typeToGenerate.Type is not INamedTypeSymbol namedType) 2189foreach (INamedTypeSymbol currentType in typeToGenerate.Type.GetSortedTypeHierarchy()) 2798ITypeSymbol type = typeToGenerate.Type;