4 types derived from TypeSpec
Microsoft.Extensions.Configuration.Binder.SourceGeneration (4)
Specs\Types\SimpleTypeSpec.cs (1)
8public abstract record SimpleTypeSpec : TypeSpec
Specs\Types\TypeSpec.cs (3)
51public abstract record ComplexTypeSpec : TypeSpec 56internal sealed record NullableSpec : TypeSpec 62internal sealed record UnsupportedTypeSpec : TypeSpec
45 references to TypeSpec
Microsoft.Extensions.Configuration.Binder.SourceGeneration (45)
ConfigurationBindingGenerator.Parser.cs (11)
26private readonly Dictionary<ITypeSymbol, TypeSpec> _createdTypeSpecs = new(SymbolEqualityComparer.Default); 127TypeSpec typeSpec = _createdTypeSpecs[typeParseInfo.TypeSymbol]; 167if (_createdTypeSpecs.TryGetValue(memberTypeSymbol, out TypeSpec? memberTypeSpec)) 177private TypeSpec CreateTypeSpec(TypeParseInfo typeParseInfo) 180TypeSpec spec; 341private TypeSpec CreateArraySpec(TypeParseInfo typeParseInfo) 366private TypeSpec? CreateCollectionSpec(TypeParseInfo typeParseInfo) 370TypeSpec? spec; 385private TypeSpec? CreateDictionarySpec(TypeParseInfo typeParseInfo, ITypeSymbol keyTypeSymbol, ITypeSymbol elementTypeSymbol) 457private TypeSpec? CreateEnumerableSpec(TypeParseInfo typeParseInfo) 1019private void RecordTypeDiagnosticIfRequired(TypeParseInfo typeParseInfo, TypeSpec typeSpec)
Emitter\CoreBindingHelpers.cs (7)
48foreach (TypeSpec type in types) 104foreach (TypeSpec type in targetTypes) 106TypeSpec effectiveType = _typeIndex.GetEffectiveTypeSpec(type); 191foreach (TypeSpec type in targetTypes) 384TypeSpec memberType = _typeIndex.GetTypeSpec(member.TypeRef); 772TypeSpec elementType = _typeIndex.GetEffectiveTypeSpec(type.ElementTypeRef); 1131TypeSpec memberType = _typeIndex.GetTypeSpec(member.TypeRef);
Parser\ConfigurationBinder.cs (1)
254private void RegisterInterceptor_ConfigurationBinder(TypeParseInfo typeParseInfo, TypeSpec typeSpec)
Parser\OptionsBuilderConfigurationExtensions.cs (1)
86private void RegisterInterceptor_OptionsBuilderExt(TypeParseInfo typeParseInfo, TypeSpec typeSpec)
Parser\OptionsConfigurationServiceCollectionExtensions.cs (1)
79private void RegisterInterceptor_ServiceCollectionExt(TypeParseInfo typeParseInfo, TypeSpec typeSpec)
Specs\BindingHelperInfo.cs (14)
19public required ImmutableEquatableArray<TypeSpec>? TypesForGen_GetCore { get; init; } 20public required ImmutableEquatableArray<TypeSpec>? TypesForGen_GetValueCore { get; init; } 32private readonly Dictionary<MethodsToGen_CoreBindingHelper, HashSet<TypeSpec>> _typesForGen = new(); 51TypesForGen_GetCore = GetTypesForGen_CoreBindingHelper<TypeSpec>(MethodsToGen_CoreBindingHelper.GetCore), 53TypesForGen_GetValueCore = GetTypesForGen_CoreBindingHelper<TypeSpec>(MethodsToGen_CoreBindingHelper.GetValueCore), 60where TSpec : TypeSpec, IEquatable<TSpec> 62_typesForGen.TryGetValue(overload, out HashSet<TypeSpec>? typesAsBase); 69IEnumerable<TSpec> types = typeof(TSpec) == typeof(TypeSpec) 77where TSpec : TypeSpec, IEquatable<TSpec> => 81public bool TryRegisterTypeForGetGen(TypeSpec type) 93public bool TryRegisterTypeForGetValueGen(TypeSpec typeSpec) 238private void RegisterTypeForMethodGen(MethodsToGen_CoreBindingHelper method, TypeSpec type) 240if (!_typesForGen.TryGetValue(method, out HashSet<TypeSpec>? types)) 242_typesForGen[method] = types = new HashSet<TypeSpec>();
Specs\SourceGenerationSpec.cs (1)
12public required ImmutableEquatableArray<TypeSpec> ConfigTypes { get; init; }
Specs\TypeIndex.cs (9)
12internal sealed class TypeIndex(IEnumerable<TypeSpec> typeSpecs) 14private readonly Dictionary<TypeRef, TypeSpec> _index = typeSpecs.ToDictionary(spec => spec.TypeRef); 47TypeSpec propTypeSpec = GetEffectiveTypeSpec(property.TypeRef); 61public TypeSpec GetEffectiveTypeSpec(TypeRef typeRef) 63TypeSpec typeSpec = GetTypeSpec(typeRef); 67public TypeSpec GetEffectiveTypeSpec(TypeSpec typeSpec) 70TypeSpec effectiveSpec = effectiveRef == typeSpec.TypeRef ? typeSpec : _index[effectiveRef]; 74public TypeSpec GetTypeSpec(TypeRef typeRef) => _index[typeRef];