4 types derived from TypeSpec
ConfigurationSchemaGenerator (4)
RuntimeSource\Configuration.Binder\Specs\Types\SimpleTypeSpec.cs (1)
8public abstract record SimpleTypeSpec : TypeSpec
RuntimeSource\Configuration.Binder\Specs\Types\TypeSpec.cs (3)
41public abstract record ComplexTypeSpec : TypeSpec 46internal sealed record NullableSpec : TypeSpec 52internal sealed record UnsupportedTypeSpec : TypeSpec
45 references to TypeSpec
ConfigurationSchemaGenerator (45)
ConfigSchemaEmitter.cs (6)
36private readonly Stack<TypeSpec> _visitedTypes = new(); 101private bool GeneratePathSegment(JsonObject currentNode, TypeSpec type, Queue<string> pathSegments) 182private bool GenerateType(JsonObject currentNode, TypeSpec type) 378private IPropertySymbol? GetPropertySymbol(TypeSpec type, PropertySpec property) 391private static bool ShouldSkipProperty(PropertySpec property, TypeSpec propertyType, IPropertySymbol? propertySymbol) 490private void GenerateDescriptionForType(JsonObject currentNode, TypeSpec type)
ConfigurationBindingGenerator.ForSchemaGeneration.cs (4)
42var types = new List<TypeSpec>(); 64private TypeSpec CreateTopTypeSpec(CancellationToken cancellationToken) 67TypeSpec result = null; 76TypeSpec currentResult;
RuntimeSource\Configuration.Binder\ConfigurationBindingGenerator.Parser.cs (11)
26private readonly Dictionary<ITypeSymbol, TypeSpec> _createdTypeSpecs = new(SymbolEqualityComparer.Default); 126TypeSpec typeSpec = _createdTypeSpecs[typeParseInfo.TypeSymbol]; 163if (_createdTypeSpecs.TryGetValue(memberTypeSymbol, out TypeSpec? memberTypeSpec)) 173private TypeSpec CreateTypeSpec(TypeParseInfo typeParseInfo) 176TypeSpec spec; 337private TypeSpec CreateArraySpec(TypeParseInfo typeParseInfo) 362private TypeSpec CreateCollectionSpec(TypeParseInfo typeParseInfo) 366TypeSpec spec; 381private TypeSpec CreateDictionarySpec(TypeParseInfo typeParseInfo, ITypeSymbol keyTypeSymbol, ITypeSymbol elementTypeSymbol) 443private TypeSpec CreateEnumerableSpec(TypeParseInfo typeParseInfo) 889private void RecordTypeDiagnosticIfRequired(TypeParseInfo typeParseInfo, TypeSpec typeSpec)
RuntimeSource\Configuration.Binder\Parser\ConfigurationBinder.cs (1)
254private void RegisterInterceptor_ConfigurationBinder(TypeParseInfo typeParseInfo, TypeSpec typeSpec)
RuntimeSource\Configuration.Binder\Parser\OptionsBuilderConfigurationExtensions.cs (1)
86private void RegisterInterceptor_OptionsBuilderExt(TypeParseInfo typeParseInfo, TypeSpec typeSpec)
RuntimeSource\Configuration.Binder\Parser\OptionsConfigurationServiceCollectionExtensions.cs (1)
79private void RegisterInterceptor_ServiceCollectionExt(TypeParseInfo typeParseInfo, TypeSpec typeSpec)
RuntimeSource\Configuration.Binder\Specs\BindingHelperInfo.cs (12)
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) 207private void RegisterTypeForMethodGen(MethodsToGen_CoreBindingHelper method, TypeSpec type) 209if (!_typesForGen.TryGetValue(method, out HashSet<TypeSpec>? types)) 211_typesForGen[method] = types = new HashSet<TypeSpec>();
RuntimeSource\Configuration.Binder\Specs\TypeIndex.cs (9)
12internal sealed class TypeIndex(IEnumerable<TypeSpec> typeSpecs) 14private readonly Dictionary<TypeRef, TypeSpec> _index = typeSpecs.ToDictionary(spec => spec.TypeRef); 42TypeSpec propTypeSpec = GetEffectiveTypeSpec(property.TypeRef); 56public TypeSpec GetEffectiveTypeSpec(TypeRef typeRef) 58TypeSpec typeSpec = GetTypeSpec(typeRef); 62public TypeSpec GetEffectiveTypeSpec(TypeSpec typeSpec) 65TypeSpec effectiveSpec = effectiveRef == typeSpec.TypeRef ? typeSpec : _index[effectiveRef]; 69public TypeSpec GetTypeSpec(TypeRef typeRef) => _index[typeRef];