1 write to TypeRef
Microsoft.Extensions.Configuration.Binder.SourceGeneration (1)
Specs\Types\TypeSpec.cs (1)
15
TypeRef
= new TypeRef(type);
35 references to TypeRef
Microsoft.Extensions.Configuration.Binder.SourceGeneration (35)
ConfigurationBindingGenerator.Parser.cs (2)
57
ConfigTypes = _createdTypeSpecs.Values.OrderBy(s => s.
TypeRef
.FullyQualifiedName).ToImmutableEquatableArray(),
170
return memberTypeSpec.
TypeRef
;
Emitter\ConfigurationBinder.cs (1)
160
var {{Identifier.typedObj}} = ({{type.
TypeRef
.FullyQualifiedName}}){{Identifier.instance}};
Emitter\CoreBindingHelpers.cs (23)
108
Debug.Assert(effectiveType is UnsupportedTypeSpec || _typeIndex.CanBindTo(type.
TypeRef
));
112
EmitStartBlock($"{conditionKindExpr} ({Identifier.type} == typeof({type.
TypeRef
.FullyQualifiedName}))");
150
Debug.Fail($"Complex should not be included for GetCore gen: {complexType.
TypeRef
.FullyQualifiedName}");
194
EmitStartBlock($"{conditionKindExpr} ({Identifier.type} == typeof({type.
TypeRef
.FullyQualifiedName}))");
234
EmitStartBlock($"{conditionKindExpr} ({Identifier.type} == typeof({type.
TypeRef
.FullyQualifiedName}))");
235
_writer.WriteLine($"var {Identifier.temp} = ({effectiveType.
TypeRef
.FullyQualifiedName}){Identifier.instance};");
263
string objParameterExpression = $"ref {type.
TypeRef
.FullyQualifiedName} {Identifier.instance}";
333
EmitStartBlock($"public static {type.
TypeRef
.FullyQualifiedName} {GetInitializeMethodDisplayString(type)}({Identifier.IConfiguration} {Identifier.configuration}, {Identifier.BinderOptions}? {Identifier.binderOptions})");
360
string returnExpression = $"return new {type.
TypeRef
.FullyQualifiedName}({string.Join(", ", ctorArgList)})";
386
string parsedMemberDeclarationLhs = $"{memberType.
TypeRef
.FullyQualifiedName} {escapedName}";
619
string typeFQN = type.
TypeRef
.FullyQualifiedName;
808
_writer.WriteLine($"{keyType.
TypeRef
.FullyQualifiedName} {Identifier.key} = {parsedKeyExpr};");
814
string elementTypeDisplayString = complexElementType.
TypeRef
.FullyQualifiedName + (complexElementType.IsValueType ? string.Empty : "?");
881
string validateMethodCallExpr = $"{Identifier.ValidateConfigurationKeys}(typeof({type.
TypeRef
.FullyQualifiedName}), {keyCacheFieldName}, {Identifier.configuration}, {Identifier.binderOptions});";
921
string containingTypeRef = property.IsStatic ? type.
TypeRef
.FullyQualifiedName : Identifier.instance;
1055
if (!stringParsableType.
TypeRef
.CanBeNull)
1146
string effectiveMemberTypeFQN = effectiveMemberType.
TypeRef
.FullyQualifiedName;
1153
_writer.WriteLine($"{memberType.
TypeRef
.FullyQualifiedName} {nullableTempIdentifier} = {memberAccessExpr};");
1169
_writer.WriteLine($"{effectiveMemberType.
TypeRef
.FullyQualifiedName}? {tempIdentifier} = {memberAccessExpr};");
1259
_writer.WriteLine($"{type.
TypeRef
.FullyQualifiedName}? {tempIdentifier} = {memberAccessExpr};");
1361
StringParsableTypeKind.Enum => $"ParseEnum<{type.
TypeRef
.FullyQualifiedName}>({sectionValueExpr}, {sectionPathExpr})",
1398
string typeFQN = type.
TypeRef
.FullyQualifiedName;
1411
castExpr = $"({collectionWithCtorInitType.
TypeRef
.FullyQualifiedName})";
Parser\ConfigurationBinder.cs (1)
263
_helperInfoBuilder!.TryRegisterTransitiveTypesForMethodGen(complexTypeSpec.
TypeRef
))
Specs\BindingHelperInfo.cs (2)
83
if (TryRegisterTransitiveTypesForMethodGen(type.
TypeRef
))
103
if (TryRegisterTransitiveTypesForMethodGen(type.
TypeRef
))
Specs\TypeIndex.cs (5)
14
private readonly Dictionary<TypeRef, TypeSpec> _index = typeSpecs.ToDictionary(spec => spec.
TypeRef
);
70
TypeSpec effectiveSpec = effectiveRef == typeSpec.
TypeRef
? typeSpec : _index[effectiveRef];
80
? type.
TypeRef
.FullyQualifiedName
93
string typeFNQ = type.
TypeRef
.FullyQualifiedName;
127
string displayString = type.
TypeRef
.FullyQualifiedName;
Specs\Types\TypeSpec.cs (1)
16
EffectiveTypeRef =
TypeRef
; // Overridden by NullableSpec.