public Stream OpenDataStream(string fileName) { AcbCueRecord cue; try { cue = Cues.Single(c => c.CueName == fileName); } catch (InvalidOperationException ex) { throw new InvalidOperationException($"File '{fileName}' is not found or it has multiple entries.", ex); } return(GetDataStreamFromCueInfo(cue, fileName)); }
public Stream OpenDataStream(uint cueId) { AcbCueRecord cue; var tempFileName = $"cue #{cueId}"; try { cue = Cues.Single(c => c.CueId == cueId); } catch (InvalidOperationException ex) { throw new InvalidOperationException($"File '{tempFileName}' is not found or it has multiple entries.", ex); } return(GetDataStreamFromCueInfo(cue, tempFileName)); }