Make DiscJob abstract
This commit is contained in:
parent
6f813edbdb
commit
b2982825d8
|
@ -399,7 +399,7 @@ namespace BizHawk.Emulation.DiscSystem.CUE
|
|||
});
|
||||
}
|
||||
|
||||
public void Run()
|
||||
public override void Run()
|
||||
{
|
||||
//in params
|
||||
var cue = IN_CueFile;
|
||||
|
|
|
@ -163,7 +163,7 @@ namespace BizHawk.Emulation.DiscSystem.CUE
|
|||
OUT_Disc.RawTOCEntries.Add(new RawTOCEntry { QData = toc_sq });
|
||||
}
|
||||
|
||||
public void Run()
|
||||
public override void Run()
|
||||
{
|
||||
//params
|
||||
var compiled = IN_CompileJob;
|
||||
|
|
|
@ -375,10 +375,10 @@ namespace BizHawk.Emulation.DiscSystem.CUE
|
|||
job.FinishLog();
|
||||
} //LoadFromString
|
||||
|
||||
public void Run(ParseCueJob job)
|
||||
public override void Run()
|
||||
{
|
||||
job.OUT_CueFile = new CUE_File();
|
||||
job.LoadFromString(job);
|
||||
OUT_CueFile = new CUE_File();
|
||||
LoadFromString(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ namespace BizHawk.Emulation.DiscSystem
|
|||
/// Returns WARNINGS for things which will are irregular or erroneous but later jobs might be able to handle, or which can be worked around by configuration assumptions.
|
||||
/// TODO - make IDisposable so I don't have to remember to Finish() it?
|
||||
/// </summary>
|
||||
public class DiscJob
|
||||
public abstract class DiscJob
|
||||
{
|
||||
internal int CurrentLine = -1;
|
||||
|
||||
|
@ -51,6 +51,8 @@ namespace BizHawk.Emulation.DiscSystem
|
|||
OUT_ErrorLevel |= job.OUT_ErrorLevel;
|
||||
swLog.Write(job.OUT_Log);
|
||||
}
|
||||
|
||||
public abstract void Run();
|
||||
}
|
||||
|
||||
internal class DiscJobAbortException : Exception
|
||||
|
|
|
@ -44,7 +44,7 @@ namespace BizHawk.Emulation.DiscSystem
|
|||
public bool OUT_SlowLoadAborted { get; private set; }
|
||||
|
||||
/// <exception cref="NotSupportedException"><see cref="IN_DiscInterface"/> is <see cref="DiscInterface.LibMirage"/></exception>
|
||||
public void Run()
|
||||
public override void Run()
|
||||
{
|
||||
switch (IN_DiscInterface)
|
||||
{
|
||||
|
@ -136,7 +136,7 @@ namespace BizHawk.Emulation.DiscSystem
|
|||
cue_content ??= File.ReadAllText(cuePath);
|
||||
parseJob.IN_CueString = cue_content;
|
||||
bool okParse = true;
|
||||
try { parseJob.Run(parseJob); }
|
||||
try { parseJob.Run(); }
|
||||
catch (DiscJobAbortException) { okParse = false; parseJob.FinishLog(); }
|
||||
if (!string.IsNullOrEmpty(parseJob.OUT_Log)) Console.WriteLine(parseJob.OUT_Log);
|
||||
ConcatenateJobLog(parseJob);
|
||||
|
|
|
@ -21,7 +21,7 @@ namespace BizHawk.Emulation.DiscSystem.SBI
|
|||
public SubQPatchData OUT_Data { get; private set; }
|
||||
|
||||
/// <exception cref="SBIParseException">file at <see cref="IN_Path"/> does not contain valid header or contains misformatted record</exception>
|
||||
public void Run()
|
||||
public override void Run()
|
||||
{
|
||||
using var fs = File.OpenRead(IN_Path);
|
||||
BinaryReader br = new BinaryReader(fs);
|
||||
|
|
Loading…
Reference in New Issue