mirror of
https://github.com/SabreTools/SabreTools.Serialization.git
synced 2026-02-07 13:54:37 +00:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0d62cbd1e9 | ||
|
|
bf753262a5 | ||
|
|
5510b5d19d | ||
|
|
d0f0ade757 | ||
|
|
26b03d8256 |
@@ -4,7 +4,7 @@
|
||||
<!-- Assembly Properties -->
|
||||
<TargetFrameworks>net48;net6.0;net7.0;net8.0</TargetFrameworks>
|
||||
<RuntimeIdentifiers>win-x86;win-x64;linux-x64;osx-x64</RuntimeIdentifiers>
|
||||
<Version>1.1.3</Version>
|
||||
<Version>1.1.6</Version>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
|
||||
<!-- Package Properties -->
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="SabreTools.IO" Version="1.1.1" />
|
||||
<PackageReference Include="SabreTools.Models" Version="1.1.2" />
|
||||
<PackageReference Include="SabreTools.Models" Version="1.1.4" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -171,6 +171,7 @@ namespace SabreTools.Serialization.Streams
|
||||
{
|
||||
case DiscTypeIdentifierROM:
|
||||
case DiscTypeIdentifierROMUltra:
|
||||
case DiscTypeIdentifierXGD4:
|
||||
body.FormatDependentContents = data.ReadBytes(52);
|
||||
break;
|
||||
case DiscTypeIdentifierReWritable:
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
|
||||
namespace SabreTools.Serialization.Wrappers
|
||||
{
|
||||
|
||||
@@ -142,7 +142,7 @@ namespace SabreTools.Serialization.Wrappers
|
||||
/// Validate the backing data source
|
||||
/// </summary>
|
||||
/// <returns>True if the data source is valid, false otherwise</returns>
|
||||
protected bool DataSourceIsValid()
|
||||
public bool DataSourceIsValid()
|
||||
{
|
||||
switch (_dataSource)
|
||||
{
|
||||
@@ -167,7 +167,7 @@ namespace SabreTools.Serialization.Wrappers
|
||||
/// <param name="position">Position in the source</param>
|
||||
/// <param name="length">Length of the data to check</param>
|
||||
/// <returns>True if the positional data is valid, false otherwise</returns>
|
||||
protected bool SegmentValid(int position, int length)
|
||||
public bool SegmentValid(int position, int length)
|
||||
{
|
||||
// Validate the data souece
|
||||
if (!DataSourceIsValid())
|
||||
@@ -207,9 +207,9 @@ namespace SabreTools.Serialization.Wrappers
|
||||
/// <param name="length">Length of the requested data</param>
|
||||
/// <returns>Byte array containing the requested data, null on error</returns>
|
||||
#if NET48
|
||||
protected byte[] ReadFromDataSource(int position, int length)
|
||||
public byte[] ReadFromDataSource(int position, int length)
|
||||
#else
|
||||
protected byte[]? ReadFromDataSource(int position, int length)
|
||||
public byte[]? ReadFromDataSource(int position, int length)
|
||||
#endif
|
||||
{
|
||||
// Validate the data source
|
||||
@@ -260,9 +260,9 @@ namespace SabreTools.Serialization.Wrappers
|
||||
/// <param name="charLimit">Number of characters needed to be a valid string</param>
|
||||
/// <returns>String list containing the requested data, null on error</returns>
|
||||
#if NET48
|
||||
protected List<string> ReadStringsFromDataSource(int position, int length, int charLimit = 5)
|
||||
public List<string> ReadStringsFromDataSource(int position, int length, int charLimit = 5)
|
||||
#else
|
||||
protected List<string>? ReadStringsFromDataSource(int position, int length, int charLimit = 5)
|
||||
public List<string>? ReadStringsFromDataSource(int position, int length, int charLimit = 5)
|
||||
#endif
|
||||
{
|
||||
// Read the data as a byte array first
|
||||
@@ -370,7 +370,7 @@ namespace SabreTools.Serialization.Wrappers
|
||||
/// Get the ending offset of the source
|
||||
/// </summary>
|
||||
/// <returns>Value greater than 0 for a valid end of file, -1 on error</returns>
|
||||
protected int GetEndOfFile()
|
||||
public int GetEndOfFile()
|
||||
{
|
||||
// Validate the data souece
|
||||
if (!DataSourceIsValid())
|
||||
|
||||
Reference in New Issue
Block a user