mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-07-21 00:05:06 +00:00
Migrate to Serialization package
This commit is contained in:
@@ -72,7 +72,7 @@ namespace BinaryObjectScanner.Wrappers
|
||||
if (data == null || data.Length == 0 || !data.CanSeek || !data.CanRead)
|
||||
return null;
|
||||
|
||||
var mediaKeyBlock = Builders.AACS.ParseMediaKeyBlock(data);
|
||||
var mediaKeyBlock = new SabreTools.Serialization.Streams.AACS().Deserialize(data);
|
||||
if (mediaKeyBlock == null)
|
||||
return null;
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@ namespace BinaryObjectScanner.Wrappers
|
||||
if (data == null || data.Length == 0 || !data.CanSeek || !data.CanRead)
|
||||
return null;
|
||||
|
||||
var svm = Builders.BDPlus.ParseSVM(data);
|
||||
var svm = new SabreTools.Serialization.Streams.BDPlus().Deserialize(data);
|
||||
if (svm == null)
|
||||
return null;
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ namespace BinaryObjectScanner.Wrappers
|
||||
if (data == null || data.Length == 0 || !data.CanSeek || !data.CanRead)
|
||||
return null;
|
||||
|
||||
var archive = Builders.BFPK.ParseArchive(data);
|
||||
var archive = new SabreTools.Serialization.Streams.BFPK().Deserialize(data);
|
||||
if (archive == null)
|
||||
return null;
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ namespace BinaryObjectScanner.Wrappers
|
||||
if (data == null || data.Length == 0 || !data.CanSeek || !data.CanRead)
|
||||
return null;
|
||||
|
||||
var file = Builders.BSP.ParseFile(data);
|
||||
var file = new SabreTools.Serialization.Streams.BSP().Deserialize(data);
|
||||
if (file == null)
|
||||
return null;
|
||||
|
||||
|
||||
@@ -22,13 +22,13 @@
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\BinaryObjectScanner.ASN1\BinaryObjectScanner.ASN1.csproj" />
|
||||
<ProjectReference Include="..\BinaryObjectScanner.Builders\BinaryObjectScanner.Builders.csproj" />
|
||||
<ProjectReference Include="..\BinaryObjectScanner.Compression\BinaryObjectScanner.Compression.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="SabreTools.IO" Version="1.1.1" />
|
||||
<PackageReference Include="SabreTools.Models" Version="1.1.1" />
|
||||
<PackageReference Include="SabreTools.Serialization" Version="1.1.0" />
|
||||
<PackageReference Include="SharpCompress" Version="0.32.2" />
|
||||
<PackageReference Include="SharpZipLib" Version="1.4.1" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -186,7 +186,7 @@ namespace BinaryObjectScanner.Wrappers
|
||||
if (data == null || data.Length == 0 || !data.CanSeek || !data.CanRead)
|
||||
return null;
|
||||
|
||||
var binary = Builders.CFB.ParseBinary(data);
|
||||
var binary = new SabreTools.Serialization.Streams.CFB().Deserialize(data);
|
||||
if (binary == null)
|
||||
return null;
|
||||
|
||||
|
||||
@@ -308,7 +308,7 @@ namespace BinaryObjectScanner.Wrappers
|
||||
if (data == null || data.Length == 0 || !data.CanSeek || !data.CanRead)
|
||||
return null;
|
||||
|
||||
var archive = Builders.N3DS.ParseCIA(data);
|
||||
var archive = new SabreTools.Serialization.Streams.CIA().Deserialize(data);
|
||||
if (archive == null)
|
||||
return null;
|
||||
|
||||
|
||||
@@ -459,7 +459,7 @@ namespace BinaryObjectScanner.Wrappers
|
||||
if (data == null || data.Length == 0 || !data.CanSeek || !data.CanRead)
|
||||
return null;
|
||||
|
||||
var file = Builders.GCF.ParseFile(data);
|
||||
var file = new SabreTools.Serialization.Streams.GCF().Deserialize(data);
|
||||
if (file == null)
|
||||
return null;
|
||||
|
||||
|
||||
@@ -286,7 +286,7 @@ namespace BinaryObjectScanner.Wrappers
|
||||
if (data == null || data.Length == 0 || !data.CanSeek || !data.CanRead)
|
||||
return null;
|
||||
|
||||
var cabinet = Builders.InstallShieldCabinet.ParseCabinet(data);
|
||||
var cabinet = new SabreTools.Serialization.Streams.InstallShieldCabinet().Deserialize(data);
|
||||
if (cabinet == null)
|
||||
return null;
|
||||
|
||||
|
||||
@@ -338,7 +338,7 @@ namespace BinaryObjectScanner.Wrappers
|
||||
if (data == null || data.Length == 0 || !data.CanSeek || !data.CanRead)
|
||||
return null;
|
||||
|
||||
var executable = Builders.LinearExecutable.ParseExecutable(data);
|
||||
var executable = new SabreTools.Serialization.Streams.LinearExecutable().Deserialize(data);
|
||||
if (executable == null)
|
||||
return null;
|
||||
|
||||
|
||||
@@ -136,7 +136,7 @@ namespace BinaryObjectScanner.Wrappers
|
||||
if (data == null || data.Length == 0 || !data.CanSeek || !data.CanRead)
|
||||
return null;
|
||||
|
||||
var executable = Builders.MSDOS.ParseExecutable(data);
|
||||
var executable = new SabreTools.Serialization.Streams.MSDOS().Deserialize(data);
|
||||
if (executable == null)
|
||||
return null;
|
||||
|
||||
|
||||
@@ -147,7 +147,7 @@ namespace BinaryObjectScanner.Wrappers
|
||||
if (data == null || data.Length == 0 || !data.CanSeek || !data.CanRead)
|
||||
return null;
|
||||
|
||||
var cabinet = Builders.MicrosoftCabinet.ParseCabinet(data);
|
||||
var cabinet = new SabreTools.Serialization.Streams.MicrosoftCabinet().Deserialize(data);
|
||||
if (cabinet == null)
|
||||
return null;
|
||||
|
||||
|
||||
@@ -269,7 +269,7 @@ namespace BinaryObjectScanner.Wrappers
|
||||
if (data == null || data.Length == 0 || !data.CanSeek || !data.CanRead)
|
||||
return null;
|
||||
|
||||
var archive = Builders.N3DS.ParseCart(data);
|
||||
var archive = new SabreTools.Serialization.Streams.N3DS().Deserialize(data);
|
||||
if (archive == null)
|
||||
return null;
|
||||
|
||||
|
||||
@@ -246,7 +246,7 @@ namespace BinaryObjectScanner.Wrappers
|
||||
if (data == null || data.Length == 0 || !data.CanSeek || !data.CanRead)
|
||||
return null;
|
||||
|
||||
var file = Builders.NCF.ParseFile(data);
|
||||
var file = new SabreTools.Serialization.Streams.NCF().Deserialize(data);
|
||||
if (file == null)
|
||||
return null;
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using static BinaryObjectScanner.Builders.Extensions;
|
||||
using static SabreTools.Serialization.Extensions;
|
||||
|
||||
namespace BinaryObjectScanner.Wrappers
|
||||
{
|
||||
@@ -264,7 +264,7 @@ namespace BinaryObjectScanner.Wrappers
|
||||
if (data == null || data.Length == 0 || !data.CanSeek || !data.CanRead)
|
||||
return null;
|
||||
|
||||
var executable = Builders.NewExecutable.ParseExecutable(data);
|
||||
var executable = new SabreTools.Serialization.Streams.NewExecutable().Deserialize(data);
|
||||
if (executable == null)
|
||||
return null;
|
||||
|
||||
|
||||
@@ -364,7 +364,7 @@ namespace BinaryObjectScanner.Wrappers
|
||||
if (data == null || data.Length == 0 || !data.CanSeek || !data.CanRead)
|
||||
return null;
|
||||
|
||||
var archive = Builders.Nitro.ParseCart(data);
|
||||
var archive = new SabreTools.Serialization.Streams.Nitro().Deserialize(data);
|
||||
if (archive == null)
|
||||
return null;
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@ namespace BinaryObjectScanner.Wrappers
|
||||
if (data == null || data.Length == 0 || !data.CanSeek || !data.CanRead)
|
||||
return null;
|
||||
|
||||
var file = Builders.PAK.ParseFile(data);
|
||||
var file = new SabreTools.Serialization.Streams.PAK().Deserialize(data);
|
||||
if (file == null)
|
||||
return null;
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ namespace BinaryObjectScanner.Wrappers
|
||||
if (data == null || data.Length == 0 || !data.CanSeek || !data.CanRead)
|
||||
return null;
|
||||
|
||||
var archive = Builders.PFF.ParseArchive(data);
|
||||
var archive = new SabreTools.Serialization.Streams.PFF().Deserialize(data);
|
||||
if (archive == null)
|
||||
return null;
|
||||
|
||||
|
||||
@@ -270,7 +270,7 @@ namespace BinaryObjectScanner.Wrappers
|
||||
if (data == null || data.Length == 0 || !data.CanSeek || !data.CanRead)
|
||||
return null;
|
||||
|
||||
var audioFile = Builders.PlayJ.ParseAudioFile(data);
|
||||
var audioFile = new SabreTools.Serialization.Streams.PlayJAudio().Deserialize(data);
|
||||
if (audioFile == null)
|
||||
return null;
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ using System.Text;
|
||||
using System.Xml;
|
||||
using BinaryObjectScanner.ASN1;
|
||||
using SabreTools.IO;
|
||||
using static BinaryObjectScanner.Builders.Extensions;
|
||||
using static SabreTools.Serialization.Extensions;
|
||||
|
||||
namespace BinaryObjectScanner.Wrappers
|
||||
{
|
||||
@@ -1034,7 +1034,7 @@ namespace BinaryObjectScanner.Wrappers
|
||||
if (data == null || data.Length == 0 || !data.CanSeek || !data.CanRead)
|
||||
return null;
|
||||
|
||||
var executable = Builders.PortableExecutable.ParseExecutable(data);
|
||||
var executable = new SabreTools.Serialization.Streams.PortableExecutable().Deserialize(data);
|
||||
if (executable == null)
|
||||
return null;
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@ namespace BinaryObjectScanner.Wrappers
|
||||
if (data == null || data.Length == 0 || !data.CanSeek || !data.CanRead)
|
||||
return null;
|
||||
|
||||
var archive = Builders.Quantum.ParseArchive(data);
|
||||
var archive = new SabreTools.Serialization.Streams.Quantum().Deserialize(data);
|
||||
if (archive == null)
|
||||
return null;
|
||||
|
||||
|
||||
@@ -404,7 +404,7 @@ namespace BinaryObjectScanner.Wrappers
|
||||
if (data == null || data.Length == 0 || !data.CanSeek || !data.CanRead)
|
||||
return null;
|
||||
|
||||
var file = Builders.SGA.ParseFile(data);
|
||||
var file = new SabreTools.Serialization.Streams.SGA().Deserialize(data);
|
||||
if (file == null)
|
||||
return null;
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ namespace BinaryObjectScanner.Wrappers
|
||||
if (data == null || data.Length == 0 || !data.CanSeek || !data.CanRead)
|
||||
return null;
|
||||
|
||||
var file = Builders.VBSP.ParseFile(data);
|
||||
var file = new SabreTools.Serialization.Streams.VBSP().Deserialize(data);
|
||||
if (file == null)
|
||||
return null;
|
||||
|
||||
|
||||
@@ -166,7 +166,7 @@ namespace BinaryObjectScanner.Wrappers
|
||||
if (data == null || data.Length == 0 || !data.CanSeek || !data.CanRead)
|
||||
return null;
|
||||
|
||||
var file = Builders.VPK.ParseFile(data);
|
||||
var file = new SabreTools.Serialization.Streams.VPK().Deserialize(data);
|
||||
if (file == null)
|
||||
return null;
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@ namespace BinaryObjectScanner.Wrappers
|
||||
if (data == null || data.Length == 0 || !data.CanSeek || !data.CanRead)
|
||||
return null;
|
||||
|
||||
var file = Builders.WAD.ParseFile(data);
|
||||
var file = new SabreTools.Serialization.Streams.WAD().Deserialize(data);
|
||||
if (file == null)
|
||||
return null;
|
||||
|
||||
|
||||
@@ -140,7 +140,7 @@ namespace BinaryObjectScanner.Wrappers
|
||||
if (data == null || data.Length == 0 || !data.CanSeek || !data.CanRead)
|
||||
return null;
|
||||
|
||||
var file = Builders.XZP.ParseFile(data);
|
||||
var file = new SabreTools.Serialization.Streams.XZP().Deserialize(data);
|
||||
if (file == null)
|
||||
return null;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user