From d08b1e5ae7a413c3ec6a958b1bc592e20baf6c8e Mon Sep 17 00:00:00 2001 From: Joseph Madamba Date: Wed, 17 Apr 2024 21:18:54 -0700 Subject: [PATCH] Add xmldoc to `GetScore()` and `Export()` and remove xmldoc from private `getDatabasedScoreInfo()` --- osu.Game/Scoring/ScoreManager.cs | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/osu.Game/Scoring/ScoreManager.cs b/osu.Game/Scoring/ScoreManager.cs index 3f6c6ee49d..b6bb637537 100644 --- a/osu.Game/Scoring/ScoreManager.cs +++ b/osu.Game/Scoring/ScoreManager.cs @@ -58,6 +58,15 @@ namespace osu.Game.Scoring }; } + /// + /// Retrieve a from a given . + /// + /// The to convert. + /// The . Null if the score on the database cannot be found. + /// + /// The is re-retrieved from the database to ensure all the required data + /// for retrieving a replay are present (may have missing properties if it was retrieved from online data). + /// public Score? GetScore(IScoreInfo scoreInfo) { ScoreInfo? databasedScoreInfo = getDatabasedScoreInfo(scoreInfo); @@ -75,12 +84,6 @@ namespace osu.Game.Scoring return Realm.Run(r => r.All().FirstOrDefault(query)?.Detach()); } - /// - /// Re-retrieve a given from the database to ensure all the required data for presenting / exporting a replay are present. - /// - /// The to attempt querying on. - /// The databased score info. Null if the score on the database cannot be found. - /// Can be used when the was retrieved from online data, as it may have missing properties. private ScoreInfo? getDatabasedScoreInfo(IScoreInfo originalScoreInfo) { ScoreInfo? databasedScoreInfo = null; @@ -194,6 +197,15 @@ namespace osu.Game.Scoring public Task>> Import(ProgressNotification notification, ImportTask[] tasks, ImportParameters parameters = default) => scoreImporter.Import(notification, tasks); + /// + /// Export a replay from a given . + /// + /// The to export. + /// The . Null if the score on the database cannot be found. + /// + /// The is re-retrieved from the database to ensure all the required data + /// for exporting a replay are present (may have missing properties if it was retrieved from online data). + /// public Task? Export(ScoreInfo scoreInfo) { ScoreInfo? databasedScoreInfo = getDatabasedScoreInfo(scoreInfo);