Update all usages of CreateContext to use either Run or Write

This commit is contained in:
Dean Herbert
2022-01-21 17:08:20 +09:00
parent da0a803e6c
commit 114c9e8c1f
22 changed files with 230 additions and 250 deletions

View File

@ -34,10 +34,9 @@ namespace osu.Game.Overlays.Settings.Sections.Input
{
string rulesetName = Ruleset?.ShortName;
List<RealmKeyBinding> bindings;
List<RealmKeyBinding> bindings = null;
using (var realm = realmFactory.CreateContext())
bindings = realm.All<RealmKeyBinding>().Where(b => b.RulesetName == rulesetName && b.Variant == variant).Detach();
realmFactory.Run(realm => bindings = realm.All<RealmKeyBinding>().Where(b => b.RulesetName == rulesetName && b.Variant == variant).Detach());
foreach (var defaultGroup in Defaults.GroupBy(d => d.Action))
{