71 references to _typeSymbols
Microsoft.Extensions.Configuration.Binder.SourceGeneration (71)
ConfigurationBindingGenerator.Parser.cs (55)
43if (_typeSymbols is not { IConfiguration: { }, ConfigurationBinder: { } }) 60EmitNotNullIfNotNull = _typeSymbols.NotNullIfNotNullAttribute is not null, 69!_typeSymbols.Compilation.IsSymbolAccessibleWithin(type, _typeSymbols.Compilation.Assembly) || 89if (SymbolEqualityComparer.Default.Equals(candidateBinderType, _typeSymbols.ConfigurationBinder)) 93else if (SymbolEqualityComparer.Default.Equals(candidateBinderType, _typeSymbols.OptionsBuilderConfigurationExtensions)) 97else if (SymbolEqualityComparer.Default.Equals(candidateBinderType, _typeSymbols.OptionsConfigurationServiceCollectionExtensions)) 205else if (SymbolEqualityComparer.Default.Equals(type, _typeSymbols.IConfigurationSection)) 299if (SymbolEqualityComparer.Default.Equals(type, _typeSymbols.CultureInfo)) 303else if (SymbolEqualityComparer.Default.Equals(type, _typeSymbols.DateTimeOffset) || 304SymbolEqualityComparer.Default.Equals(type, _typeSymbols.DateOnly) || 305SymbolEqualityComparer.Default.Equals(type, _typeSymbols.TimeOnly) || 306SymbolEqualityComparer.Default.Equals(type, _typeSymbols.TimeSpan)) 310else if (SymbolEqualityComparer.Default.Equals(type, _typeSymbols.Int128) || 311SymbolEqualityComparer.Default.Equals(type, _typeSymbols.Half) || 312SymbolEqualityComparer.Default.Equals(type, _typeSymbols.UInt128)) 316else if (SymbolEqualityComparer.Default.Equals(type, _typeSymbols.Uri)) 320else if (SymbolEqualityComparer.Default.Equals(type, _typeSymbols.Version) || 321SymbolEqualityComparer.Default.Equals(type, _typeSymbols.Guid)) 390bool isDictionary = _typeSymbols.GenericICollection is not null && GetInterface(type, _typeSymbols.GenericIDictionary_Unbound) is not null; 422else if (_typeSymbols.Dictionary is not null && 423(IsInterfaceMatch(type, _typeSymbols.GenericIDictionary_Unbound) || IsInterfaceMatch(type, _typeSymbols.IDictionary))) 429else if (_typeSymbols.Dictionary is not null && IsInterfaceMatch(type, _typeSymbols.IReadOnlyDictionary_Unbound)) 461bool isCollection = _typeSymbols.GenericICollection is not null && GetInterface(type, _typeSymbols.GenericICollection_Unbound) is not null; 498else if ((IsInterfaceMatch(type, _typeSymbols.GenericICollection_Unbound) || IsInterfaceMatch(type, _typeSymbols.GenericIList_Unbound))) 504else if (IsInterfaceMatch(type, _typeSymbols.GenericIEnumerable_Unbound)) 512else if (IsInterfaceMatch(type, _typeSymbols.ISet_Unbound)) 518else if (IsInterfaceMatch(type, _typeSymbols.IReadOnlySet_Unbound)) 526else if (IsInterfaceMatch(type, _typeSymbols.IReadOnlyList_Unbound) || IsInterfaceMatch(type, _typeSymbols.IReadOnlyCollection_Unbound)) 554Conversion conversion = _typeSymbols.Compilation.ClassifyConversion(source, dest); 572if (SymbolEqualityComparer.Default.Equals(_typeSymbols.IntPtr, type) || 573SymbolEqualityComparer.Default.Equals(_typeSymbols.UIntPtr, type) || 574SymbolEqualityComparer.Default.Equals(_typeSymbols.SerializationInfo, type) || 575SymbolEqualityComparer.Default.Equals(_typeSymbols.ParameterInfo, type) || 576IsAssignableTo(type, _typeSymbols.MemberInfo) || 577IsAssignableTo(type, _typeSymbols.Delegate)) 759AttributeData? attributeData = attributes.FirstOrDefault(a => SymbolEqualityComparer.Default.Equals(a.AttributeClass, _typeSymbols.ConfigurationKeyNameAttribute)); 761bool isIgnored = attributes.Any(a => SymbolEqualityComparer.Default.Equals(a.AttributeClass, _typeSymbols.ConfigurationIgnoreAttribute)); 847INamedTypeSymbol? candidate = GetInterface(type, _typeSymbols.GenericIEnumerable_Unbound); 861INamedTypeSymbol? candidate = GetInterface(type, _typeSymbols.GenericIDictionary_Unbound) ?? GetInterface(type, _typeSymbols.IReadOnlyDictionary_Unbound); 870if (IsInterfaceMatch(type, _typeSymbols.IDictionary)) 872keyType = _typeSymbols.String; 873elementType = _typeSymbols.String; 883type is INamedTypeSymbol namedType && GetInterface(namedType, _typeSymbols.IEnumerable) is not null; 1072_emitGenericParseEnum = _typeSymbols.Enum.GetMembers("Parse").Any(m => m is IMethodSymbol methodSymbol && methodSymbol.IsGenericMethod); 1080if (_typeSymbols.ArgumentNullException is not null) 1082var throwIfNullMethods = _typeSymbols.ArgumentNullException.GetMembers("ThrowIfNull"); 1093&& secondParam.Name == "paramName" && secondParam.Type.Equals(_typeSymbols.String, SymbolEqualityComparer.Default))
Parser\ConfigurationBinder.cs (5)
45if (!SymbolEqualityComparer.Default.Equals(_typeSymbols.IConfiguration, @params[0].Type)) 62else if (SymbolEqualityComparer.Default.Equals(@params[2].Type, _typeSymbols.ActionOfBinderOptions)) 140if (!SymbolEqualityComparer.Default.Equals(_typeSymbols.IConfiguration, @params[0].Type)) 161else if (paramCount is 2 && SymbolEqualityComparer.Default.Equals(@params[1].Type, _typeSymbols.ActionOfBinderOptions)) 179else if (paramCount is 3 && SymbolEqualityComparer.Default.Equals(@params[2].Type, _typeSymbols.ActionOfBinderOptions))
Parser\OptionsBuilderConfigurationExtensions.cs (4)
23!SymbolEqualityComparer.Default.Equals(_typeSymbols.OptionsBuilderOfT_Unbound, genericType.ConstructUnboundGenericType())) 51if (!SymbolEqualityComparer.Default.Equals(_typeSymbols.IConfiguration, @params[1].Type)) 593 when SymbolEqualityComparer.Default.Equals(_typeSymbols.ActionOfBinderOptions, @params[2].Type) => 80SymbolEqualityComparer.Default.Equals(_typeSymbols.ActionOfBinderOptions, @params[2].Type))
Parser\OptionsConfigurationServiceCollectionExtensions.cs (7)
23!SymbolEqualityComparer.Default.Equals(_typeSymbols.IServiceCollection, @params[0].Type)) 35if (paramCount is 2 && SymbolEqualityComparer.Default.Equals(_typeSymbols.IConfiguration, @params[1].Type)) 45SymbolEqualityComparer.Default.Equals(_typeSymbols.IConfiguration, thirdParamType)) 49else if (SymbolEqualityComparer.Default.Equals(_typeSymbols.IConfiguration, secondParamType) && 50SymbolEqualityComparer.Default.Equals(_typeSymbols.ActionOfBinderOptions, thirdParamType)) 61SymbolEqualityComparer.Default.Equals(_typeSymbols.IConfiguration, @params[2].Type) && 62SymbolEqualityComparer.Default.Equals(_typeSymbols.ActionOfBinderOptions, @params[3].Type))