mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-09-22 06:45:03 +00:00
Add skeletons for all wrappers
This commit is contained in:
64
BurnOutSharp.Wrappers/LinearExecutable.cs
Normal file
64
BurnOutSharp.Wrappers/LinearExecutable.cs
Normal file
@@ -0,0 +1,64 @@
|
||||
using System.IO;
|
||||
|
||||
namespace BurnOutSharp.Wrappers
|
||||
{
|
||||
public class LinearExecutable
|
||||
{
|
||||
#region Pass-Through Properties
|
||||
|
||||
// TODO: Determine what properties can be passed through
|
||||
|
||||
#endregion
|
||||
|
||||
#region Extension Properties
|
||||
|
||||
// TODO: Determine what extension properties are needed
|
||||
|
||||
#endregion
|
||||
|
||||
#region Instance Variables
|
||||
|
||||
/// <summary>
|
||||
/// Internal representation of the executable
|
||||
/// </summary>
|
||||
private BurnOutSharp.Models.LinearExecutable.Executable _executable;
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// Private constructor
|
||||
/// </summary>
|
||||
private LinearExecutable() { }
|
||||
|
||||
/// <summary>
|
||||
/// Create an LE/LX executable from a byte array and offset
|
||||
/// </summary>
|
||||
/// <param name="data">Byte array representing the executable</param>
|
||||
/// <param name="offset">Offset within the array to parse</param>
|
||||
/// <returns>An LE/LX executable wrapper on success, null on failure</returns>
|
||||
public static LinearExecutable Create(byte[] data, int offset)
|
||||
{
|
||||
var executable = BurnOutSharp.Builder.LinearExecutable.ParseExecutable(data, offset);
|
||||
if (executable == null)
|
||||
return null;
|
||||
|
||||
var wrapper = new LinearExecutable { _executable = executable };
|
||||
return wrapper;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create an LE/LX executable from a Stream
|
||||
/// </summary>
|
||||
/// <param name="data">Stream representing the executable</param>
|
||||
/// <returns>An LE/LX executable wrapper on success, null on failure</returns>
|
||||
public static LinearExecutable Create(Stream data)
|
||||
{
|
||||
var executable = BurnOutSharp.Builder.LinearExecutable.ParseExecutable(data);
|
||||
if (executable == null)
|
||||
return null;
|
||||
|
||||
var wrapper = new LinearExecutable { _executable = executable };
|
||||
return wrapper;
|
||||
}
|
||||
}
|
||||
}
|
||||
64
BurnOutSharp.Wrappers/MSDOS.cs
Normal file
64
BurnOutSharp.Wrappers/MSDOS.cs
Normal file
@@ -0,0 +1,64 @@
|
||||
using System.IO;
|
||||
|
||||
namespace BurnOutSharp.Wrappers
|
||||
{
|
||||
public class MSDOS
|
||||
{
|
||||
#region Pass-Through Properties
|
||||
|
||||
// TODO: Determine what properties can be passed through
|
||||
|
||||
#endregion
|
||||
|
||||
#region Extension Properties
|
||||
|
||||
// TODO: Determine what extension properties are needed
|
||||
|
||||
#endregion
|
||||
|
||||
#region Instance Variables
|
||||
|
||||
/// <summary>
|
||||
/// Internal representation of the executable
|
||||
/// </summary>
|
||||
private BurnOutSharp.Models.MSDOS.Executable _executable;
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// Private constructor
|
||||
/// </summary>
|
||||
private MSDOS() { }
|
||||
|
||||
/// <summary>
|
||||
/// Create an MS-DOS executable from a byte array and offset
|
||||
/// </summary>
|
||||
/// <param name="data">Byte array representing the executable</param>
|
||||
/// <param name="offset">Offset within the array to parse</param>
|
||||
/// <returns>An MS-DOS executable wrapper on success, null on failure</returns>
|
||||
public static MSDOS Create(byte[] data, int offset)
|
||||
{
|
||||
var executable = BurnOutSharp.Builder.MSDOS.ParseExecutable(data, offset);
|
||||
if (executable == null)
|
||||
return null;
|
||||
|
||||
var wrapper = new MSDOS { _executable = executable };
|
||||
return wrapper;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create an MS-DOS executable from a Stream
|
||||
/// </summary>
|
||||
/// <param name="data">Stream representing the executable</param>
|
||||
/// <returns>An MS-DOS executable wrapper on success, null on failure</returns>
|
||||
public static MSDOS Create(Stream data)
|
||||
{
|
||||
var executable = BurnOutSharp.Builder.MSDOS.ParseExecutable(data);
|
||||
if (executable == null)
|
||||
return null;
|
||||
|
||||
var wrapper = new MSDOS { _executable = executable };
|
||||
return wrapper;
|
||||
}
|
||||
}
|
||||
}
|
||||
64
BurnOutSharp.Wrappers/NewExecutable.cs
Normal file
64
BurnOutSharp.Wrappers/NewExecutable.cs
Normal file
@@ -0,0 +1,64 @@
|
||||
using System.IO;
|
||||
|
||||
namespace BurnOutSharp.Wrappers
|
||||
{
|
||||
public class NewExecutable
|
||||
{
|
||||
#region Pass-Through Properties
|
||||
|
||||
// TODO: Determine what properties can be passed through
|
||||
|
||||
#endregion
|
||||
|
||||
#region Extension Properties
|
||||
|
||||
// TODO: Determine what extension properties are needed
|
||||
|
||||
#endregion
|
||||
|
||||
#region Instance Variables
|
||||
|
||||
/// <summary>
|
||||
/// Internal representation of the executable
|
||||
/// </summary>
|
||||
private BurnOutSharp.Models.NewExecutable.Executable _executable;
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// Private constructor
|
||||
/// </summary>
|
||||
private NewExecutable() { }
|
||||
|
||||
/// <summary>
|
||||
/// Create an NE executable from a byte array and offset
|
||||
/// </summary>
|
||||
/// <param name="data">Byte array representing the executable</param>
|
||||
/// <param name="offset">Offset within the array to parse</param>
|
||||
/// <returns>An NE executable wrapper on success, null on failure</returns>
|
||||
public static NewExecutable Create(byte[] data, int offset)
|
||||
{
|
||||
var executable = BurnOutSharp.Builder.NewExecutable.ParseExecutable(data, offset);
|
||||
if (executable == null)
|
||||
return null;
|
||||
|
||||
var wrapper = new NewExecutable { _executable = executable };
|
||||
return wrapper;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create an NE executable from a Stream
|
||||
/// </summary>
|
||||
/// <param name="data">Stream representing the executable</param>
|
||||
/// <returns>An NE executable wrapper on success, null on failure</returns>
|
||||
public static NewExecutable Create(Stream data)
|
||||
{
|
||||
var executable = BurnOutSharp.Builder.NewExecutable.ParseExecutable(data);
|
||||
if (executable == null)
|
||||
return null;
|
||||
|
||||
var wrapper = new NewExecutable { _executable = executable };
|
||||
return wrapper;
|
||||
}
|
||||
}
|
||||
}
|
||||
64
BurnOutSharp.Wrappers/PortableExecutable.cs
Normal file
64
BurnOutSharp.Wrappers/PortableExecutable.cs
Normal file
@@ -0,0 +1,64 @@
|
||||
using System.IO;
|
||||
|
||||
namespace BurnOutSharp.Wrappers
|
||||
{
|
||||
public class PortableExecutable
|
||||
{
|
||||
#region Pass-Through Properties
|
||||
|
||||
// TODO: Determine what properties can be passed through
|
||||
|
||||
#endregion
|
||||
|
||||
#region Extension Properties
|
||||
|
||||
// TODO: Determine what extension properties are needed
|
||||
|
||||
#endregion
|
||||
|
||||
#region Instance Variables
|
||||
|
||||
/// <summary>
|
||||
/// Internal representation of the executable
|
||||
/// </summary>
|
||||
private BurnOutSharp.Models.PortableExecutable.Executable _executable;
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// Private constructor
|
||||
/// </summary>
|
||||
private PortableExecutable() { }
|
||||
|
||||
/// <summary>
|
||||
/// Create a PE executable from a byte array and offset
|
||||
/// </summary>
|
||||
/// <param name="data">Byte array representing the executable</param>
|
||||
/// <param name="offset">Offset within the array to parse</param>
|
||||
/// <returns>A PE executable wrapper on success, null on failure</returns>
|
||||
public static PortableExecutable Create(byte[] data, int offset)
|
||||
{
|
||||
var executable = BurnOutSharp.Builder.PortableExecutable.ParseExecutable(data, offset);
|
||||
if (executable == null)
|
||||
return null;
|
||||
|
||||
var wrapper = new PortableExecutable { _executable = executable };
|
||||
return wrapper;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create a PE executable from a Stream
|
||||
/// </summary>
|
||||
/// <param name="data">Stream representing the executable</param>
|
||||
/// <returns>A PE executable wrapper on success, null on failure</returns>
|
||||
public static PortableExecutable Create(Stream data)
|
||||
{
|
||||
var executable = BurnOutSharp.Builder.PortableExecutable.ParseExecutable(data);
|
||||
if (executable == null)
|
||||
return null;
|
||||
|
||||
var wrapper = new PortableExecutable { _executable = executable };
|
||||
return wrapper;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -28,6 +28,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BurnOutSharp.Builder", "Bur
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ExecutableTest", "ExecutableTest\ExecutableTest.csproj", "{4B59824C-7E0A-4478-B408-FEAA1FD80F8F}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BurnOutSharp.Wrappers", "BurnOutSharp.Wrappers\BurnOutSharp.Wrappers.csproj", "{35BD489F-E58D-45DD-9929-DC4B32414750}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@@ -70,6 +72,10 @@ Global
|
||||
{4B59824C-7E0A-4478-B408-FEAA1FD80F8F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{4B59824C-7E0A-4478-B408-FEAA1FD80F8F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{4B59824C-7E0A-4478-B408-FEAA1FD80F8F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{35BD489F-E58D-45DD-9929-DC4B32414750}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{35BD489F-E58D-45DD-9929-DC4B32414750}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{35BD489F-E58D-45DD-9929-DC4B32414750}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{35BD489F-E58D-45DD-9929-DC4B32414750}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\BurnOutSharp.Builder\BurnOutSharp.Builder.csproj" />
|
||||
<ProjectReference Include="..\BurnOutSharp.Models\BurnOutSharp.Models.csproj" />
|
||||
<ProjectReference Include="..\BurnOutSharp.Wrappers\BurnOutSharp.Wrappers.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
Reference in New Issue
Block a user