mirror of https://github.com/ppy/osu
Rename decoder
This commit is contained in:
parent
617149fb27
commit
e5f4d8686e
|
@ -7,15 +7,15 @@
|
|||
namespace osu.Game.Scoring.Legacy
|
||||
{
|
||||
/// <summary>
|
||||
/// A <see cref="LegacyScoreParser"/> which retrieves the applicable <see cref="Beatmap"/> and <see cref="Ruleset"/>
|
||||
/// A <see cref="LegacyScoreDecoder"/> which retrieves the applicable <see cref="Beatmap"/> and <see cref="Ruleset"/>
|
||||
/// for the score from the database.
|
||||
/// </summary>
|
||||
public class DatabasedLegacyScoreParser : LegacyScoreParser
|
||||
public class DatabasedLegacyScoreDecoder : LegacyScoreDecoder
|
||||
{
|
||||
private readonly RulesetStore rulesets;
|
||||
private readonly BeatmapManager beatmaps;
|
||||
|
||||
public DatabasedLegacyScoreParser(RulesetStore rulesets, BeatmapManager beatmaps)
|
||||
public DatabasedLegacyScoreDecoder(RulesetStore rulesets, BeatmapManager beatmaps)
|
||||
{
|
||||
this.rulesets = rulesets;
|
||||
this.beatmaps = beatmaps;
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
namespace osu.Game.Scoring.Legacy
|
||||
{
|
||||
public abstract class LegacyScoreParser
|
||||
public abstract class LegacyScoreDecoder
|
||||
{
|
||||
private IBeatmap currentBeatmap;
|
||||
private Ruleset currentRuleset;
|
|
@ -19,7 +19,7 @@ public LegacyDatabasedScore(ScoreInfo score, RulesetStore rulesets, BeatmapManag
|
|||
var replayFilename = score.Files.First(f => f.Filename.EndsWith(".osr", StringComparison.InvariantCultureIgnoreCase)).FileInfo.StoragePath;
|
||||
|
||||
using (var stream = store.GetStream(replayFilename))
|
||||
Replay = new DatabasedLegacyScoreParser(rulesets, beatmaps).Parse(stream).Replay;
|
||||
Replay = new DatabasedLegacyScoreDecoder(rulesets, beatmaps).Parse(stream).Replay;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -46,9 +46,9 @@ protected override ScoreInfo CreateModel(ArchiveReader archive)
|
|||
{
|
||||
try
|
||||
{
|
||||
return new DatabasedLegacyScoreParser(rulesets, beatmaps()).Parse(stream).ScoreInfo;
|
||||
return new DatabasedLegacyScoreDecoder(rulesets, beatmaps()).Parse(stream).ScoreInfo;
|
||||
}
|
||||
catch (LegacyScoreParser.BeatmapNotFoundException e)
|
||||
catch (LegacyScoreDecoder.BeatmapNotFoundException e)
|
||||
{
|
||||
Logger.Log(e.Message, LoggingTarget.Information, LogLevel.Error);
|
||||
return null;
|
||||
|
|
Loading…
Reference in New Issue