Skip to content

Commit 6ecbb40

Browse files
committed
C#: Turn initialize into a readonly field.
1 parent d76bb49 commit 6ecbb40

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

csharp/extractor/Semmle.Extraction.CSharp.Standalone/FileContent.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ internal partial class FileContent
2121
private readonly Func<IEnumerable<string>> getFiles;
2222
private readonly Func<HashSet<string>> getAlreadyDownloadedPackages;
2323
private readonly HashSet<string> notYetDownloadedPackages = new HashSet<string>();
24-
private Initializer Initialize { get; init; }
24+
private readonly Initializer initialize;
2525

2626
public HashSet<string> NotYetDownloadedPackages
2727
{
2828
get
2929
{
30-
Initialize.Run();
30+
initialize.Run();
3131
return notYetDownloadedPackages;
3232
}
3333
}
@@ -45,7 +45,7 @@ public bool UseAspNetDlls
4545
{
4646
get
4747
{
48-
Initialize.Run();
48+
initialize.Run();
4949
return useAspNetDlls;
5050
}
5151
}
@@ -59,7 +59,7 @@ internal FileContent(Func<HashSet<string>> getAlreadyDownloadedPackages,
5959
this.progressMonitor = progressMonitor;
6060
this.getFiles = getFiles;
6161
this.unsafeFileReader = unsafeFileReader;
62-
Initialize = new Initializer(DoInitialize);
62+
this.initialize = new Initializer(DoInitialize);
6363
}
6464

6565

0 commit comments

Comments
 (0)