Enable nullable context and move WrapperFactory

This commit is contained in:
Matt Nadareski
2023-09-17 00:18:04 -04:00
parent c86b1251a3
commit 93ba88a35f
72 changed files with 616 additions and 96 deletions

View File

@@ -11,7 +11,11 @@ namespace BinaryObjectScanner.FileType
public class XZP : IExtractable
{
/// <inheritdoc/>
#if NET48
public string Extract(string file, bool includeDebug)
#else
public string? Extract(string file, bool includeDebug)
#endif
{
if (!File.Exists(file))
return null;
@@ -23,12 +27,16 @@ namespace BinaryObjectScanner.FileType
}
/// <inheritdoc/>
#if NET48
public string Extract(Stream stream, string file, bool includeDebug)
#else
public string? Extract(Stream stream, string file, bool includeDebug)
#endif
{
try
{
// Create the wrapper
SabreTools.Serialization.Wrappers.XZP xzp = SabreTools.Serialization.Wrappers.XZP.Create(stream);
var xzp = SabreTools.Serialization.Wrappers.XZP.Create(stream);
if (xzp == null)
return null;