C#: Turn initialize into a readonly field.

This commit is contained in:
Michael Nebel 2023-08-14 11:19:42 +02:00
Родитель d76bb49b6a
Коммит 6ecbb400d7
1 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -21,13 +21,13 @@ namespace Semmle.BuildAnalyser
private readonly Func<IEnumerable<string>> getFiles;
private readonly Func<HashSet<string>> getAlreadyDownloadedPackages;
private readonly HashSet<string> notYetDownloadedPackages = new HashSet<string>();
private Initializer Initialize { get; init; }
private readonly Initializer initialize;
public HashSet<string> NotYetDownloadedPackages
{
get
{
Initialize.Run();
initialize.Run();
return notYetDownloadedPackages;
}
}
@ -45,7 +45,7 @@ namespace Semmle.BuildAnalyser
{
get
{
Initialize.Run();
initialize.Run();
return useAspNetDlls;
}
}
@ -59,7 +59,7 @@ namespace Semmle.BuildAnalyser
this.progressMonitor = progressMonitor;
this.getFiles = getFiles;
this.unsafeFileReader = unsafeFileReader;
Initialize = new Initializer(DoInitialize);
this.initialize = new Initializer(DoInitialize);
}