1 write to TypeRef
Microsoft.Extensions.Configuration.Binder.SourceGeneration (1)
Specs\Types\TypeSpec.cs (1)
15
TypeRef
= new TypeRef(type);
34 references to TypeRef
Microsoft.Extensions.Configuration.Binder.SourceGeneration (34)
ConfigurationBindingGenerator.Parser.cs (2)
57
ConfigTypes = _createdTypeSpecs.Values.OrderBy(s => s.
TypeRef
.FullyQualifiedName).ToImmutableEquatableArray(),
167
return memberTypeSpec.
TypeRef
;
Emitter\ConfigurationBinder.cs (1)
160
var {{Identifier.typedObj}} = ({{type.
TypeRef
.FullyQualifiedName}}){{Identifier.instance}};
Emitter\CoreBindingHelpers.cs (22)
107
Debug.Assert(effectiveType is UnsupportedTypeSpec || _typeIndex.CanBindTo(type.
TypeRef
));
111
EmitStartBlock($"{conditionKindExpr} ({Identifier.type} == typeof({type.
TypeRef
.FullyQualifiedName}))");
149
Debug.Fail($"Complex should not be included for GetCore gen: {complexType.
TypeRef
.FullyQualifiedName}");
193
EmitStartBlock($"{conditionKindExpr} ({Identifier.type} == typeof({type.
TypeRef
.FullyQualifiedName}))");
233
EmitStartBlock($"{conditionKindExpr} ({Identifier.type} == typeof({type.
TypeRef
.FullyQualifiedName}))");
234
_writer.WriteLine($"var {Identifier.temp} = ({effectiveType.
TypeRef
.FullyQualifiedName}){Identifier.instance};");
262
string objParameterExpression = $"ref {type.
TypeRef
.FullyQualifiedName} {Identifier.instance}";
325
EmitStartBlock($"public static {type.
TypeRef
.FullyQualifiedName} {GetInitializeMethodDisplayString(type)}({Identifier.IConfiguration} {Identifier.configuration}, {Identifier.BinderOptions}? {Identifier.binderOptions})");
352
string returnExpression = $"return new {type.
TypeRef
.FullyQualifiedName}({string.Join(", ", ctorArgList)})";
377
string parsedMemberDeclarationLhs = $"{memberType.
TypeRef
.FullyQualifiedName} {member.Name}";
614
string typeFQN = type.
TypeRef
.FullyQualifiedName;
803
_writer.WriteLine($"{keyType.
TypeRef
.FullyQualifiedName} {Identifier.key} = {parsedKeyExpr};");
809
string elementTypeDisplayString = complexElementType.
TypeRef
.FullyQualifiedName + (complexElementType.IsValueType ? string.Empty : "?");
859
string validateMethodCallExpr = $"{Identifier.ValidateConfigurationKeys}(typeof({type.
TypeRef
.FullyQualifiedName}), {keyCacheFieldName}, {Identifier.configuration}, {Identifier.binderOptions});";
866
string containingTypeRef = property.IsStatic ? type.
TypeRef
.FullyQualifiedName : Identifier.instance;
931
if (!stringParsableType.
TypeRef
.CanBeNull)
1021
string effectiveMemberTypeFQN = effectiveMemberType.
TypeRef
.FullyQualifiedName;
1028
_writer.WriteLine($"{memberType.
TypeRef
.FullyQualifiedName} {nullableTempIdentifier} = {memberAccessExpr};");
1116
_writer.WriteLine($"{type.
TypeRef
.FullyQualifiedName}? {tempIdentifier} = {memberAccessExpr};");
1178
StringParsableTypeKind.Enum => $"ParseEnum<{type.
TypeRef
.FullyQualifiedName}>({sectionValueExpr}, {sectionPathExpr})",
1215
string typeFQN = type.
TypeRef
.FullyQualifiedName;
1228
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
);
65
TypeSpec effectiveSpec = effectiveRef == typeSpec.
TypeRef
? typeSpec : _index[effectiveRef];
75
? type.
TypeRef
.FullyQualifiedName
88
string typeFNQ = type.
TypeRef
.FullyQualifiedName;
122
string displayString = type.
TypeRef
.FullyQualifiedName;
Specs\Types\TypeSpec.cs (1)
16
EffectiveTypeRef =
TypeRef
; // Overridden by NullableSpec.