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(),
170
return memberTypeSpec.
TypeRef
;
Emitter\ConfigurationBinder.cs (1)
163
var {{Identifier.typedObj}} = ({{type.
TypeRef
.FullyQualifiedName}}){{Identifier.instance}};
Emitter\CoreBindingHelpers.cs (22)
108
Debug.Assert(effectiveType is UnsupportedTypeSpec || _typeIndex.CanBindTo(type.
TypeRef
));
112
EmitStartBlock($"{conditionKindExpr} ({Identifier.type} == typeof({type.
TypeRef
.FullyQualifiedName}))");
194
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};");
266
string objParameterExpression = $"ref {type.
TypeRef
.FullyQualifiedName} {Identifier.instance}";
336
EmitStartBlock($"public static {type.
TypeRef
.FullyQualifiedName} {GetInitializeMethodDisplayString(type)}({Identifier.IConfiguration} {Identifier.configuration}, {Identifier.BinderOptions}? {Identifier.binderOptions})");
363
string returnExpression = $"return new {type.
TypeRef
.FullyQualifiedName}({string.Join(", ", ctorArgList)})";
389
string parsedMemberDeclarationLhs = $"{memberType.
TypeRef
.FullyQualifiedName} {escapedName}";
622
string typeFQN = type.
TypeRef
.FullyQualifiedName;
811
_writer.WriteLine($"{keyType.
TypeRef
.FullyQualifiedName} {Identifier.key} = {parsedKeyExpr};");
817
string elementTypeDisplayString = complexElementType.
TypeRef
.FullyQualifiedName + (complexElementType.IsValueType ? string.Empty : "?");
884
string validateMethodCallExpr = $"{Identifier.ValidateConfigurationKeys}(typeof({type.
TypeRef
.FullyQualifiedName}), {keyCacheFieldName}, {Identifier.configuration}, {Identifier.binderOptions});";
924
string containingTypeRef = property.IsStatic ? type.
TypeRef
.FullyQualifiedName : Identifier.instance;
1059
if (!stringParsableType.
TypeRef
.CanBeNull)
1154
string effectiveMemberTypeFQN = effectiveMemberType.
TypeRef
.FullyQualifiedName;
1161
_writer.WriteLine($"{memberType.
TypeRef
.FullyQualifiedName} {nullableTempIdentifier} = {memberAccessExpr};");
1177
_writer.WriteLine($"{effectiveMemberType.
TypeRef
.FullyQualifiedName}? {tempIdentifier} = {memberAccessExpr};");
1273
_writer.WriteLine($"{type.
TypeRef
.FullyQualifiedName}? {tempIdentifier} = {memberAccessExpr};");
1379
StringParsableTypeKind.Enum => $"ParseEnum<{type.
TypeRef
.FullyQualifiedName}>({sectionValueExpr}, {sectionPathExpr})",
1416
string typeFQN = type.
TypeRef
.FullyQualifiedName;
1429
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
);
94
TypeSpec effectiveSpec = effectiveRef == typeSpec.
TypeRef
? typeSpec : _index[effectiveRef];
104
? type.
TypeRef
.FullyQualifiedName
117
string typeFNQ = type.
TypeRef
.FullyQualifiedName;
151
string displayString = type.
TypeRef
.FullyQualifiedName;
Specs\Types\TypeSpec.cs (1)
16
EffectiveTypeRef =
TypeRef
; // Overridden by NullableSpec.