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)) 202else if (SymbolEqualityComparer.Default.Equals(type, _typeSymbols.IConfigurationSection)) 296if (SymbolEqualityComparer.Default.Equals(type, _typeSymbols.CultureInfo)) 300else if (SymbolEqualityComparer.Default.Equals(type, _typeSymbols.DateTimeOffset) || 301SymbolEqualityComparer.Default.Equals(type, _typeSymbols.DateOnly) || 302SymbolEqualityComparer.Default.Equals(type, _typeSymbols.TimeOnly) || 303SymbolEqualityComparer.Default.Equals(type, _typeSymbols.TimeSpan)) 307else if (SymbolEqualityComparer.Default.Equals(type, _typeSymbols.Int128) || 308SymbolEqualityComparer.Default.Equals(type, _typeSymbols.Half) || 309SymbolEqualityComparer.Default.Equals(type, _typeSymbols.UInt128)) 313else if (SymbolEqualityComparer.Default.Equals(type, _typeSymbols.Uri)) 317else if (SymbolEqualityComparer.Default.Equals(type, _typeSymbols.Version) || 318SymbolEqualityComparer.Default.Equals(type, _typeSymbols.Guid)) 387bool isDictionary = _typeSymbols.GenericICollection is not null && GetInterface(type, _typeSymbols.GenericIDictionary_Unbound) is not null; 419else if (_typeSymbols.Dictionary is not null && 420(IsInterfaceMatch(type, _typeSymbols.GenericIDictionary_Unbound) || IsInterfaceMatch(type, _typeSymbols.IDictionary))) 426else if (_typeSymbols.Dictionary is not null && IsInterfaceMatch(type, _typeSymbols.IReadOnlyDictionary_Unbound)) 458bool isCollection = _typeSymbols.GenericICollection is not null && GetInterface(type, _typeSymbols.GenericICollection_Unbound) is not null; 495else if ((IsInterfaceMatch(type, _typeSymbols.GenericICollection_Unbound) || IsInterfaceMatch(type, _typeSymbols.GenericIList_Unbound))) 501else if (IsInterfaceMatch(type, _typeSymbols.GenericIEnumerable_Unbound)) 509else if (IsInterfaceMatch(type, _typeSymbols.ISet_Unbound)) 515else if (IsInterfaceMatch(type, _typeSymbols.IReadOnlySet_Unbound)) 523else if (IsInterfaceMatch(type, _typeSymbols.IReadOnlyList_Unbound) || IsInterfaceMatch(type, _typeSymbols.IReadOnlyCollection_Unbound)) 551Conversion conversion = _typeSymbols.Compilation.ClassifyConversion(source, dest); 564if (SymbolEqualityComparer.Default.Equals(_typeSymbols.IntPtr, type) || 565SymbolEqualityComparer.Default.Equals(_typeSymbols.UIntPtr, type) || 566SymbolEqualityComparer.Default.Equals(_typeSymbols.SerializationInfo, type) || 567SymbolEqualityComparer.Default.Equals(_typeSymbols.ParameterInfo, type) || 568IsAssignableTo(type, _typeSymbols.MemberInfo) || 569IsAssignableTo(type, _typeSymbols.Delegate)) 728AttributeData? attributeData = attributes.FirstOrDefault(a => SymbolEqualityComparer.Default.Equals(a.AttributeClass, _typeSymbols.ConfigurationKeyNameAttribute)); 730bool isIgnored = attributes.Any(a => SymbolEqualityComparer.Default.Equals(a.AttributeClass, _typeSymbols.ConfigurationIgnoreAttribute)); 811INamedTypeSymbol? candidate = GetInterface(type, _typeSymbols.GenericIEnumerable_Unbound); 825INamedTypeSymbol? candidate = GetInterface(type, _typeSymbols.GenericIDictionary_Unbound) ?? GetInterface(type, _typeSymbols.IReadOnlyDictionary_Unbound); 834if (IsInterfaceMatch(type, _typeSymbols.IDictionary)) 836keyType = _typeSymbols.String; 837elementType = _typeSymbols.String; 847type is INamedTypeSymbol namedType && GetInterface(namedType, _typeSymbols.IEnumerable) is not null; 998_emitGenericParseEnum = _typeSymbols.Enum.GetMembers("Parse").Any(m => m is IMethodSymbol methodSymbol && methodSymbol.IsGenericMethod); 1006if (_typeSymbols.ArgumentNullException is not null) 1008var throwIfNullMethods = _typeSymbols.ArgumentNullException.GetMembers("ThrowIfNull"); 1019&& 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))