Create Redumper extensions class

This commit is contained in:
Matt Nadareski
2022-09-28 12:43:40 -07:00
parent df7046723c
commit b623866b6e
3 changed files with 24 additions and 1 deletions

View File

@@ -123,6 +123,7 @@
- Add Redumper dumping command
- Add Redumper command validation
- Add Redumper command generation
- Create Redumper extensions class
### 2.3 (2022-02-05)
- Start overhauling Redump information pulling, again

View File

@@ -0,0 +1,22 @@
using RedumpLib.Data;
namespace MPF.Modules.Redumper
{
public static class Converters
{
#region Cross-enumeration conversions
/// <summary>
/// Get the default extension for a given disc type
/// </summary>
/// <param name="type">MediaType value to check</param>
/// <returns>Valid extension (with leading '.'), null on error</returns>
public static string Extension(MediaType? type)
{
// TODO: Determine what extensions are used for each supported type
return ".bin";
}
#endregion
}
}

View File

@@ -615,7 +615,7 @@ namespace MPF.Modules.Redumper
}
/// <inheritdoc/>
public override string GetDefaultExtension(MediaType? mediaType) => ".bin"; // TODO: Fill out
public override string GetDefaultExtension(MediaType? mediaType) => Converters.Extension(mediaType);
/// <inheritdoc/>
public override bool IsDumpingCommand()