mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Remove unnecessary Field exclusion
This commit is contained in:
@@ -1,15 +1,16 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
using SabreTools.Library.Filtering;
|
||||
using Newtonsoft.Json;
|
||||
using System.Linq;
|
||||
using SabreTools.Library.Tools;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace SabreTools.Library.DatItems
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents which BIOS(es) is associated with a set
|
||||
/// </summary>
|
||||
[JsonObject("biosset")]
|
||||
public class BiosSet : DatItem
|
||||
{
|
||||
#region Fields
|
||||
@@ -30,38 +31,6 @@ namespace SabreTools.Library.DatItems
|
||||
|
||||
#region Accessors
|
||||
|
||||
/// <summary>
|
||||
/// Get the value of that field as a string, if possible
|
||||
/// </summary>
|
||||
public override string GetField(Field field, List<Field> excludeFields)
|
||||
{
|
||||
// If the field is to be excluded, return empty string
|
||||
if (excludeFields.Contains(field))
|
||||
return string.Empty;
|
||||
|
||||
// Handle BiosSet-specific fields
|
||||
string fieldValue;
|
||||
switch (field)
|
||||
{
|
||||
case Field.Default:
|
||||
fieldValue = Default?.ToString();
|
||||
break;
|
||||
case Field.BiosDescription:
|
||||
fieldValue = Description;
|
||||
break;
|
||||
|
||||
// For everything else, use the base method
|
||||
default:
|
||||
return base.GetField(field, excludeFields);
|
||||
}
|
||||
|
||||
// Make sure we don't return null
|
||||
if (string.IsNullOrEmpty(fieldValue))
|
||||
fieldValue = string.Empty;
|
||||
|
||||
return fieldValue;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set fields with given values
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user