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