1 write to _knownSymbols
System.Text.Json.SourceGeneration (1)
JsonSourceGenerator.Parser.cs (1)
68_knownSymbols = knownSymbols;
54 references to _knownSymbols
System.Text.Json.SourceGeneration (54)
JsonSourceGenerator.Parser.cs (54)
57if (location is null || !_knownSymbols.Compilation.ContainsLocation(location)) 85Debug.Assert(_knownSymbols.JsonSerializerContextType != null); 98if (!_knownSymbols.JsonSerializerContextType.IsAssignableFrom(contextTypeSymbol)) 118LanguageVersion? langVersion = _knownSymbols.Compilation.GetLanguageVersion(); 210type = _knownSymbols.Compilation.EraseCompileTimeMetadata(type); 234Debug.Assert(_knownSymbols.JsonSerializableAttributeType != null); 235Debug.Assert(_knownSymbols.JsonSourceGenerationOptionsAttributeType != null); 244if (SymbolEqualityComparer.Default.Equals(attributeClass, _knownSymbols.JsonSerializableAttributeType)) 254else if (SymbolEqualityComparer.Default.Equals(attributeClass, _knownSymbols.JsonSourceGenerationOptionsAttributeType)) 483if (location is null || !_knownSymbols.Compilation.ContainsLocation(location)) 491Type = _knownSymbols.Compilation.EraseCompileTimeMetadata(typeSymbol), 558Debug.Assert(_knownSymbols.JsonStringEnumConverterOfTType != null); 559INamedTypeSymbol converterSymbol = _knownSymbols.JsonStringEnumConverterOfTType.Construct(type); 594constructorSetsRequiredMembers = defaultCtor?.ContainsAttribute(_knownSymbols.SetsRequiredMembersAttributeType) == true; 613bool useDefaultCtorInAnnotatedStructs = type.GetCompatibleGenericBaseType(_knownSymbols.KeyValuePair) is null; 627implementsIJsonOnSerializing = _knownSymbols.IJsonOnSerializingType.IsAssignableFrom(type); 628implementsIJsonOnSerialized = _knownSymbols.IJsonOnSerializedType.IsAssignableFrom(type); 703if (SymbolEqualityComparer.Default.Equals(attributeType, _knownSymbols.JsonNumberHandlingAttributeType)) 708else if (SymbolEqualityComparer.Default.Equals(attributeType, _knownSymbols.JsonUnmappedMemberHandlingAttributeType)) 713else if (SymbolEqualityComparer.Default.Equals(attributeType, _knownSymbols.JsonObjectCreationHandlingAttributeType)) 718else if (!foundJsonConverterAttribute && _knownSymbols.JsonConverterAttributeType.IsAssignableFrom(attributeType)) 724if (SymbolEqualityComparer.Default.Equals(attributeType, _knownSymbols.JsonDerivedTypeAttributeType)) 755if (SymbolEqualityComparer.Default.Equals(type.OriginalDefinition, _knownSymbols.MemoryType)) 757Debug.Assert(!SymbolEqualityComparer.Default.Equals(type, _knownSymbols.MemoryByteType)); 763if (SymbolEqualityComparer.Default.Equals(type.OriginalDefinition, _knownSymbols.ReadOnlyMemoryType)) 765Debug.Assert(!SymbolEqualityComparer.Default.Equals(type, _knownSymbols.ReadOnlyMemoryByteType)); 772if (type.GetCompatibleGenericBaseType(_knownSymbols.IAsyncEnumerableOfTType) is INamedTypeSymbol iAsyncEnumerableType) 779if (!_knownSymbols.IEnumerableType.IsAssignableFrom(type)) 791else if ((actualTypeToConvert = type.GetCompatibleGenericBaseType(_knownSymbols.KeyedCollectionType)) != null) 796else if ((actualTypeToConvert = type.GetCompatibleGenericBaseType(_knownSymbols.ListOfTType)) != null) 801else if ((actualTypeToConvert = type.GetCompatibleGenericBaseType(_knownSymbols.DictionaryOfTKeyTValueType)) != null) 807else if (_knownSymbols.IsImmutableDictionaryType(type, out immutableCollectionFactoryTypeFullName)) 814else if ((actualTypeToConvert = type.GetCompatibleGenericBaseType(_knownSymbols.IDictionaryOfTKeyTValueType)) != null) 821else if ((actualTypeToConvert = type.GetCompatibleGenericBaseType(_knownSymbols.IReadonlyDictionaryOfTKeyTValueType)) != null) 828else if (_knownSymbols.IsImmutableEnumerableType(type, out immutableCollectionFactoryTypeFullName)) 833else if ((actualTypeToConvert = type.GetCompatibleGenericBaseType(_knownSymbols.IListOfTType)) != null) 838else if ((actualTypeToConvert = type.GetCompatibleGenericBaseType(_knownSymbols.ISetOfTType)) != null) 843else if ((actualTypeToConvert = type.GetCompatibleGenericBaseType(_knownSymbols.ICollectionOfTType)) != null) 848else if ((actualTypeToConvert = type.GetCompatibleGenericBaseType(_knownSymbols.StackOfTType)) != null) 853else if ((actualTypeToConvert = type.GetCompatibleGenericBaseType(_knownSymbols.QueueOfTType)) != null) 858else if ((actualTypeToConvert = type.GetCompatibleGenericBaseType(_knownSymbols.ConcurrentStackType)) != null) 863else if ((actualTypeToConvert = type.GetCompatibleGenericBaseType(_knownSymbols.ConcurrentQueueType)) != null) 868else if ((actualTypeToConvert = type.GetCompatibleGenericBaseType(_knownSymbols.IEnumerableOfTType)) != null) 873else if (_knownSymbols.IDictionaryType.IsAssignableFrom(type)) 876keyType = _knownSymbols.StringType; 877valueType = _knownSymbols.ObjectType; 880else if (_knownSymbols.IListType.IsAssignableFrom(type)) 883valueType = _knownSymbols.ObjectType; 885else if (_knownSymbols.StackType.IsAssignableFrom(type)) 888valueType = _knownSymbols.ObjectType; 890else if (_knownSymbols.QueueType.IsAssignableFrom(type)) 893valueType = _knownSymbols.ObjectType; 898valueType = _knownSymbols.ObjectType; 906INamedTypeSymbol? dictionary = _knownSymbols.DictionaryOfTKeyTValueType?.Construct(keyType, valueType);