diff --git a/osu.Game/Beatmaps/BeatmapStore.cs b/osu.Game/Beatmaps/BeatmapStore.cs index 9c5a1a9dfc..817b46041f 100644 --- a/osu.Game/Beatmaps/BeatmapStore.cs +++ b/osu.Game/Beatmaps/BeatmapStore.cs @@ -26,14 +26,6 @@ namespace osu.Game.Beatmaps { } - protected override Type[] ValidTypes => new[] - { - typeof(BeatmapSetInfo), - typeof(BeatmapInfo), - typeof(BeatmapMetadata), - typeof(BeatmapDifficulty), - }; - protected override void Prepare(bool reset = false) { if (reset) diff --git a/osu.Game/Database/DatabaseBackedStore.cs b/osu.Game/Database/DatabaseBackedStore.cs index 6b3fe232b2..46fc596584 100644 --- a/osu.Game/Database/DatabaseBackedStore.cs +++ b/osu.Game/Database/DatabaseBackedStore.cs @@ -2,7 +2,6 @@ // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using System; -using System.Linq; using Microsoft.EntityFrameworkCore; using osu.Framework.Logging; using osu.Framework.Platform; @@ -47,13 +46,5 @@ namespace osu.Game.Database /// Reset this database to a default state. Undo all changes to database and storage backings. /// public void Reset() => Prepare(true); - - private void checkType(Type type) - { - if (!ValidTypes.Contains(type)) - throw new InvalidOperationException($"The requested operation specified a type of {type}, which is invalid for this {nameof(DatabaseBackedStore)}."); - } - - protected abstract Type[] ValidTypes { get; } } } diff --git a/osu.Game/IO/FileStore.cs b/osu.Game/IO/FileStore.cs index c15ebd264e..55b00b51d9 100644 --- a/osu.Game/IO/FileStore.cs +++ b/osu.Game/IO/FileStore.cs @@ -27,10 +27,6 @@ namespace osu.Game.IO Store = new NamespacedResourceStore(new StorageBackedResourceStore(storage), prefix); } - protected override Type[] ValidTypes => new[] { - typeof(FileInfo), - }; - protected override void Prepare(bool reset = false) { if (reset) diff --git a/osu.Game/Input/KeyBindingStore.cs b/osu.Game/Input/KeyBindingStore.cs index f9578d150b..088e3bd75b 100644 --- a/osu.Game/Input/KeyBindingStore.cs +++ b/osu.Game/Input/KeyBindingStore.cs @@ -1,7 +1,6 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using System; using System.Collections.Generic; using System.Linq; using Microsoft.EntityFrameworkCore; @@ -57,11 +56,6 @@ namespace osu.Game.Input } } - protected override Type[] ValidTypes => new[] - { - typeof(DatabasedKeyBinding) - }; - public List Query(int? rulesetId = null, int? variant = null) => new List(Connection.DatabasedKeyBinding.Where(b => b.RulesetID == rulesetId && b.Variant == variant)); diff --git a/osu.Game/Rulesets/RulesetStore.cs b/osu.Game/Rulesets/RulesetStore.cs index 068997e732..fe9dfd7a11 100644 --- a/osu.Game/Rulesets/RulesetStore.cs +++ b/osu.Game/Rulesets/RulesetStore.cs @@ -109,8 +109,6 @@ namespace osu.Game.Rulesets ID = ruleset.LegacyID }; - protected override Type[] ValidTypes => new[] { typeof(RulesetInfo) }; - public RulesetInfo GetRuleset(int id) => Connection.RulesetInfo.First(r => r.ID == id); public RulesetInfo QueryRulesetInfo(Func query) diff --git a/osu.Game/Rulesets/Scoring/ScoreStore.cs b/osu.Game/Rulesets/Scoring/ScoreStore.cs index 1604e8cb1c..66fcfb5d67 100644 --- a/osu.Game/Rulesets/Scoring/ScoreStore.cs +++ b/osu.Game/Rulesets/Scoring/ScoreStore.cs @@ -1,7 +1,6 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using System; using System.Collections.Generic; using System.IO; using osu.Framework.Platform; @@ -147,7 +146,5 @@ namespace osu.Game.Rulesets.Scoring protected override void Prepare(bool reset = false) { } - - protected override Type[] ValidTypes => new[] { typeof(Score) }; } }