Support ancient .NET in FileTypes

This commit is contained in:
Matt Nadareski
2024-02-28 21:59:13 -05:00
parent 080c8a749b
commit de59d0252c
49 changed files with 597 additions and 59 deletions

View File

@@ -97,7 +97,11 @@ namespace SabreTools.Features
Parallel.ForEach(typeDats.Keys, Globals.ParallelOptions, itemType =>
{
Writer.Write(typeDats[itemType], OutputDir);
#if NET40_OR_GREATER || NETCOREAPP
});
#else
}
#endif
watch.Stop();
}
@@ -139,7 +143,11 @@ namespace SabreTools.Features
Parallel.ForEach(sizedDats, Globals.ParallelOptions, sizedDat =>
{
Writer.Write(sizedDat, OutputDir);
#if NET40_OR_GREATER || NETCOREAPP
});
#else
}
#endif
watch.Stop();
}
@@ -155,7 +163,11 @@ namespace SabreTools.Features
Parallel.ForEach(typeDats.Keys, Globals.ParallelOptions, itemType =>
{
Writer.Write(typeDats[itemType], OutputDir);
#if NET40_OR_GREATER || NETCOREAPP
});
#else
}
#endif
watch.Stop();
}

View File

@@ -175,7 +175,11 @@ namespace SabreTools.Features
// Try to output the file, overwriting only if it's not in the current directory
Writer.Write(datFile, realOutDir, overwrite: GetBoolean(features, InplaceValue));
#if NET40_OR_GREATER || NETCOREAPP
});
#else
}
#endif
return true;
}
@@ -308,7 +312,11 @@ namespace SabreTools.Features
// Finally output the diffed DatFile
string interOutDir = inputPath.GetOutputPath(OutputDir, GetBoolean(features, InplaceValue));
Writer.Write(repDat, interOutDir, overwrite: GetBoolean(features, InplaceValue));
#if NET40_OR_GREATER || NETCOREAPP
});
#else
}
#endif
}
// Output DATs after replacing fields from a base DatFile
@@ -339,7 +347,11 @@ namespace SabreTools.Features
// Finally output the replaced DatFile
string interOutDir = inputPath.GetOutputPath(OutputDir, GetBoolean(features, InplaceValue));
Writer.Write(repDat, interOutDir, overwrite: GetBoolean(features, InplaceValue));
#if NET40_OR_GREATER || NETCOREAPP
});
#else
}
#endif
}
// Merge all input files and write