Add nullability to the two programs (not enforced)

This commit is contained in:
Matt Nadareski
2024-03-05 20:26:38 -05:00
parent 919973266c
commit 3c0d190dc3
43 changed files with 238 additions and 259 deletions

View File

@@ -23,7 +23,7 @@ namespace RombaSharp.Features
LongDescription = @"For each specified DAT file it creates the torrentzip files in the specified
output dir. The files will be placed in the specified location using a folder
structure according to the original DAT master directory tree structure.";
Features = new Dictionary<string, Feature>();
Features = [];
// Common Features
AddCommonFeatures();
@@ -35,7 +35,7 @@ structure according to the original DAT master directory tree structure.";
AddFeature(SubworkersInt32Input);
}
public override bool ProcessFeatures(Dictionary<string, Feature> features)
public override bool ProcessFeatures(Dictionary<string, Feature?> features)
{
// If the base fails, just fail out
if (!base.ProcessFeatures(features))
@@ -43,7 +43,7 @@ structure according to the original DAT master directory tree structure.";
// Get feature flags
bool copy = GetBoolean(features, CopyValue);
string outdat = GetString(features, OutStringValue);
string? outdat = GetString(features, OutStringValue);
// Verify the filenames
Dictionary<string, string> foundDats = GetValidDats(Inputs);
@@ -67,7 +67,7 @@ structure according to the original DAT master directory tree structure.";
outputFolder.Ensure(create: true);
// Get all online depots
List<string> onlineDepots = _depots.Where(d => d.Value.Item2).Select(d => d.Key).ToList();
List<string> onlineDepots = _depots!.Where(d => d.Value.Item2).Select(d => d.Key).ToList();
// Now scan all of those depots and rebuild
Rebuilder.RebuildDepot(