mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Seal classes and fix extensions
This commit is contained in:
@@ -49,9 +49,9 @@ namespace SabreTools.Core
|
|||||||
#region Conversion
|
#region Conversion
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Convert a DatItem to a Rom
|
/// Convert a DictionaryBase to a Rom
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static Rom? ConvertToRom(this DatItem? self)
|
public static Rom? ConvertToRom(this DictionaryBase? self)
|
||||||
{
|
{
|
||||||
// If the DatItem is missing, we can't do anything
|
// If the DatItem is missing, we can't do anything
|
||||||
if (self == null)
|
if (self == null)
|
||||||
@@ -334,7 +334,7 @@ namespace SabreTools.Core
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns if any hashes exist
|
/// Returns if any hashes exist
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static bool HasHashes(this DatItem self)
|
public static bool HasHashes(this DictionaryBase self)
|
||||||
{
|
{
|
||||||
return self switch
|
return self switch
|
||||||
{
|
{
|
||||||
@@ -348,7 +348,7 @@ namespace SabreTools.Core
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns if all of the hashes are set to their 0-byte values or null
|
/// Returns if all of the hashes are set to their 0-byte values or null
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static bool HasZeroHash(this DatItem self)
|
public static bool HasZeroHash(this DictionaryBase self)
|
||||||
{
|
{
|
||||||
return self switch
|
return self switch
|
||||||
{
|
{
|
||||||
@@ -530,9 +530,9 @@ namespace SabreTools.Core
|
|||||||
#region Information Filling
|
#region Information Filling
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Fill any missing size and hash information from another DatItem
|
/// Fill any missing size and hash information from another DictionaryBase
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static void FillMissingHashes(this DatItem? self, DatItem? other)
|
public static void FillMissingHashes(this DictionaryBase? self, DictionaryBase? other)
|
||||||
{
|
{
|
||||||
if (self == null || other == null)
|
if (self == null || other == null)
|
||||||
return;
|
return;
|
||||||
@@ -655,7 +655,7 @@ namespace SabreTools.Core
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get unique duplicate suffix on name collision
|
/// Get unique duplicate suffix on name collision
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string GetDuplicateSuffix(this DatItem? self)
|
public static string GetDuplicateSuffix(this DictionaryBase? self)
|
||||||
{
|
{
|
||||||
if (self == null)
|
if (self == null)
|
||||||
return string.Empty;
|
return string.Empty;
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ namespace SabreTools.DatFiles
|
|||||||
/// Represents all possible DAT header information
|
/// Represents all possible DAT header information
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonObject("header"), XmlRoot("header")]
|
[JsonObject("header"), XmlRoot("header")]
|
||||||
public class DatHeader : ModelBackedItem<Models.Metadata.Header>, ICloneable
|
public sealed class DatHeader : ModelBackedItem<Models.Metadata.Header>, ICloneable
|
||||||
{
|
{
|
||||||
#region Constants
|
#region Constants
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ namespace SabreTools.DatItems
|
|||||||
/// Represents the information specific to a set/game/machine
|
/// Represents the information specific to a set/game/machine
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonObject("machine"), XmlRoot("machine")]
|
[JsonObject("machine"), XmlRoot("machine")]
|
||||||
public class Machine : ModelBackedItem<Models.Metadata.Machine>, ICloneable
|
public sealed class Machine : ModelBackedItem<Models.Metadata.Machine>, ICloneable
|
||||||
{
|
{
|
||||||
#region Constants
|
#region Constants
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user