[SabreTools.Helper.Dats] Remove unnecessary constructors

This commit is contained in:
Matt Nadareski
2016-10-24 13:38:20 -07:00
parent 9a3527921f
commit a61b82eb6a
6 changed files with 9 additions and 92 deletions

View File

@@ -17,16 +17,6 @@ namespace SabreTools.Helper.Dats
_itemType = ItemType.Archive;
}
/// <summary>
/// Create a new Archive object with the included information
/// </summary>
/// <param name="name">Name of the item, including extension</param>
public Archive(string name)
{
_name = name;
_itemType = ItemType.Archive;
}
#endregion
#region Comparision Methods

View File

@@ -39,20 +39,6 @@ namespace SabreTools.Helper.Dats
_itemType = ItemType.BiosSet;
}
/// <summary>
/// Create a new Sample object with the included information
/// </summary>
/// <param name="name">Name of the item, including extension</param>
/// <param name="description">Description of the Bios set item</param>
/// <param name="default">True if this is the default BIOS, false if it is not, null for undefined</param>
public BiosSet(string name, string description, bool? @default)
{
_name = name;
_itemType = ItemType.BiosSet;
_description = description;
_default = @default;
}
#endregion
#region Comparision Methods

View File

@@ -50,22 +50,6 @@ namespace SabreTools.Helper.Dats
_itemStatus = ItemStatus.None;
}
/// <summary>
/// Create a new Disk object with the included information
/// </summary>
/// <param name="name">Name of the item, including extension</param>
/// <param name="md5">String representation of the MD5</param>
/// <param name="sha1">String representation of the SHA-1</param>
/// <param name="itemStatus">Status of the current item</param>
public Disk(string name, string md5, string sha1, ItemStatus itemStatus)
{
_name = name;
_itemType = ItemType.Disk;
_md5 = md5?.ToLowerInvariant();
_sha1 = sha1?.ToLowerInvariant();
_itemStatus = itemStatus;
}
#endregion
#region Comparision Methods

View File

@@ -55,24 +55,6 @@ namespace SabreTools.Helper.Dats
_default = null;
}
/// <summary>
/// Create a new Release object with the included information
/// </summary>
/// <param name="name">Name of the item, including extension</param>
/// <param name="region">Region of the item</param>
/// <param name="language">Language of the item</param>
/// <param name="date">String representation of the Date</param>
/// <param name="default">True if this is the default BIOS, false if it is not, null for undefined</param>
public Release(string name, string region, string language, string date, bool? @default)
{
_name = name;
_itemType = ItemType.Release;
_region = region;
_language = language;
_date = date;
_default = @default;
}
#endregion
#region Comparision Methods

View File

@@ -55,9 +55,16 @@ namespace SabreTools.Helper.Dats
/// </summary>
/// <param name="name"></param>
/// <param name="machineName"></param>
public Rom(string name, string machineName) :
this(name, -1, "null", "null", "null", ItemStatus.None, null)
public Rom(string name, string machineName)
{
_name = name;
_itemType = ItemType.Rom;
_size = -1;
_crc = "null";
_md5 = "null";
_sha1 = "null";
_itemStatus = ItemStatus.None;
_machine = new Machine
{
Name = machineName,
@@ -65,28 +72,6 @@ namespace SabreTools.Helper.Dats
};
}
/// <summary>
/// Create a new Rom object with the included information
/// </summary>
/// <param name="name">Name of the item, including extension</param>
/// <param name="size">Long size of the item</param>
/// <param name="crc">String representation of the CRC</param>
/// <param name="md5">String representation of the MD5</param>
/// <param name="sha1">String representation of the SHA-1</param>
/// <param name="itemStatus">Status of the current item</param>
/// <param name="date">String representation of the Date</param>
public Rom(string name, long size, string crc, string md5, string sha1, ItemStatus itemStatus, string date)
{
_name = name;
_itemType = ItemType.Rom;
_size = size;
_crc = crc?.ToLowerInvariant();
_md5 = md5?.ToLowerInvariant();
_sha1 = sha1?.ToLowerInvariant();
_itemStatus = itemStatus;
_date = date;
}
#endregion
#region Comparision Methods

View File

@@ -17,16 +17,6 @@ namespace SabreTools.Helper.Dats
_itemType = ItemType.Sample;
}
/// <summary>
/// Create a new Sample object with the included information
/// </summary>
/// <param name="name">Name of the item, including extension</param>
public Sample(string name)
{
_name = name;
_itemType = ItemType.Sample;
}
#endregion
#region Comparision Methods