8 instantiations of TypeRef
System.Text.Json.SourceGeneration (8)
JsonSourceGenerator.Parser.cs (8)
155ContextType = new(contextTypeSymbol), 226return new TypeRef(type); 567customConverterType = new TypeRef(converterSymbol); 641var typeRef = new TypeRef(type); 913return dictionary is null ? null : new TypeRef(dictionary); 931var declaringTypeRef = new TypeRef(currentType); 1203: new TypeRef(memberType); 1603return new TypeRef(converterType);
46 references to TypeRef
System.Text.Json.SourceGeneration (46)
JsonSourceGenerator.Emitter.cs (8)
81private readonly Dictionary<TypeRef, TypeGenerationSpec> _typeIndex = new(); 325TypeRef? collectionKeyType = typeGenerationSpec.CollectionKeyType; 330TypeRef? collectionValueType = typeGenerationSpec.CollectionValueType; 470TypeRef keyType = typeGenerationSpec.CollectionKeyType; 648TypeRef? nullableUnderlyingType = _typeIndex[property.PropertyType].NullableUnderlyingType; 954static string GetParamUnboxing(TypeRef type, int index) 1206foreach (TypeRef converter in converters) 1481{ RuntimeTypeRef: TypeRef runtimeType } => $"() => new {runtimeType.FullyQualifiedName}()",
JsonSourceGenerator.Parser.cs (21)
207private TypeRef EnqueueType(ITypeSymbol type, JsonSourceGenerationMode? generationMode) 264List<TypeRef>? converters = null; 311converters = new List<TypeRef>(); 315TypeRef? typeRef = GetConverterTypeFromAttribute(contextType, converterType, contextType, attributeData); 513TypeRef? collectionKeyType = null; 514TypeRef? collectionValueType = null; 515TypeRef? nullableUnderlyingType = null; 517TypeRef? runtimeTypeRef = null; 534out TypeRef? customConverterType, 641var typeRef = new TypeRef(type); 695out TypeRef? customConverterType, 910private TypeRef? GetDictionaryTypeRef(ITypeSymbol keyType, ITypeSymbol valueType) 931var declaringTypeRef = new TypeRef(currentType); 988TypeRef declaringTypeRef, 1120TypeRef declaringType, 1138out TypeRef? converterType, 1201TypeRef propertyTypeRef = ignoreCondition != JsonIgnoreCondition.Always 1243out TypeRef? converterType, 1483TypeRef parameterTypeRef = EnqueueType(parameterInfo.Type, typeToGenerate.Mode); 1573private TypeRef? GetConverterTypeFromJsonConverterAttribute(INamedTypeSymbol contextType, ISymbol declaringSymbol, AttributeData attributeData) 1588private TypeRef? GetConverterTypeFromAttribute(INamedTypeSymbol contextType, ITypeSymbol? converterType, ISymbol declaringSymbol, AttributeData attributeData)
Model\ContextGenerationSpec.cs (1)
30public required TypeRef ContextType { get; init; }
Model\ParameterGenerationSpec.cs (1)
27public required TypeRef ParameterType { get; init; }
Model\PropertyGenerationSpec.cs (3)
143public required TypeRef PropertyType { get; init; } 148public required TypeRef DeclaringType { get; init; } 153public required TypeRef? ConverterType { get; init; }
Model\PropertyInitializerGenerationSpec.cs (1)
29public required TypeRef ParameterType { get; init; }
Model\SourceGenerationOptionsSpec.cs (1)
23public required ImmutableEquatableArray<TypeRef>? Converters { get; init; }
Model\TypeGenerationSpec.cs (6)
34public required TypeRef TypeRef { get; init; } 78public required TypeRef? CollectionKeyType { get; init; } 80public required TypeRef? CollectionValueType { get; init; } 86public required TypeRef? NullableUnderlyingType { get; init; } 92public required TypeRef? RuntimeTypeRef { get; init; } 96public required TypeRef? ConverterType { get; init; }
src\libraries\Common\src\SourceGenerators\CSharpSyntaxUtilities.cs (1)
18public static string FormatLiteral(object? value, TypeRef type)
src\libraries\Common\src\SourceGenerators\TypeRef.cs (3)
14public sealed class TypeRef : IEquatable<TypeRef> 38public bool Equals(TypeRef? other) => other != null && FullyQualifiedName == other.FullyQualifiedName; 39public override bool Equals(object? obj) => Equals(obj as TypeRef);