@@ -4,27 +4,27 @@ namespace DynamoDBGenerator.SourceGenerator.Types;
4
4
5
5
public readonly struct CodeFactory
6
6
{
7
- public CodeFactory ( IEnumerable < string > code , IEnumerable < ITypeSymbol > typeIdentifiers )
7
+ public CodeFactory ( IEnumerable < string > lines , IEnumerable < ITypeSymbol > dependantTypes )
8
8
{
9
- _code = code ;
10
- TypeIdentifiers = typeIdentifiers ;
9
+ _lines = lines ;
10
+ DependantTypes = dependantTypes ;
11
11
}
12
12
13
- public CodeFactory ( IEnumerable < string > code )
13
+ public CodeFactory ( IEnumerable < string > lines )
14
14
{
15
- _code = code ;
16
- TypeIdentifiers = Enumerable . Empty < ITypeSymbol > ( ) ;
15
+ _lines = lines ;
16
+ DependantTypes = Enumerable . Empty < ITypeSymbol > ( ) ;
17
17
}
18
18
19
19
/// <summary>
20
- /// The code surrounding all assignments .
20
+ /// The code lines .
21
21
/// </summary>
22
- private readonly IEnumerable < string > _code ;
22
+ private readonly IEnumerable < string > _lines ;
23
23
24
24
/// <summary>
25
- /// The assignments that occur within the method .
25
+ /// The types that are <see cref="_lines"/> are dependant on .
26
26
/// </summary>
27
- private IEnumerable < ITypeSymbol > TypeIdentifiers { get ; }
27
+ private IEnumerable < ITypeSymbol > DependantTypes { get ; }
28
28
29
29
public static IEnumerable < string > Create (
30
30
ITypeSymbol typeSymbol ,
@@ -38,11 +38,11 @@ ISet<ITypeSymbol> handledTypes
38
38
39
39
var code = codeSelector ( typeSymbol ) ;
40
40
41
- foreach ( var s in code . _code )
41
+ foreach ( var s in code . _lines )
42
42
yield return s ;
43
43
44
- foreach ( var x in code . TypeIdentifiers )
45
- foreach ( var assignment in Create ( x , codeSelector , handledTypes ) )
46
- yield return assignment ;
44
+ foreach ( var nestedTypeSymbol in code . DependantTypes )
45
+ foreach ( var nestedCode in Create ( nestedTypeSymbol , codeSelector , handledTypes ) )
46
+ yield return nestedCode ;
47
47
}
48
48
}
0 commit comments