Skip to content

Commit 368d3a8

Browse files
committed
Make field ReadOnly
1 parent 926e7ff commit 368d3a8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/DynamoDBGenerator.SourceGenerator/Types/CodeFactory.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ public readonly struct CodeFactory
77
public CodeFactory(IEnumerable<string> lines, IEnumerable<ITypeSymbol> dependantTypes)
88
{
99
_lines = lines;
10-
DependantTypes = dependantTypes;
10+
_dependantTypes = dependantTypes;
1111
}
1212

1313
public CodeFactory(IEnumerable<string> lines)
1414
{
1515
_lines = lines;
16-
DependantTypes = Enumerable.Empty<ITypeSymbol>();
16+
_dependantTypes = Enumerable.Empty<ITypeSymbol>();
1717
}
1818

1919
/// <summary>
@@ -24,7 +24,7 @@ public CodeFactory(IEnumerable<string> lines)
2424
/// <summary>
2525
/// The types that are <see cref="_lines"/> are dependant on.
2626
/// </summary>
27-
private IEnumerable<ITypeSymbol> DependantTypes { get; }
27+
private readonly IEnumerable<ITypeSymbol> _dependantTypes;
2828

2929
public static IEnumerable<string> Create(
3030
ITypeSymbol typeSymbol,
@@ -41,7 +41,7 @@ ISet<ITypeSymbol> handledTypes
4141
foreach (var s in code._lines)
4242
yield return s;
4343

44-
foreach (var nestedTypeSymbol in code.DependantTypes)
44+
foreach (var nestedTypeSymbol in code._dependantTypes)
4545
foreach (var nestedCode in Create(nestedTypeSymbol, codeSelector, handledTypes))
4646
yield return nestedCode;
4747
}

0 commit comments

Comments
 (0)