mirror of
https://github.com/ppy/osu.git
synced 2025-02-16 01:03:21 +08:00
Fix unsafe caching of dependencies
This commit is contained in:
parent
03829611ae
commit
4cd8b6a2bd
@ -77,6 +77,7 @@ namespace osu.Game.Rulesets.Catch.Tests
|
||||
}
|
||||
}
|
||||
|
||||
[Cached(typeof(ISkinSource))]
|
||||
private class CatchCustomSkinSourceContainer : Container, ISkinSource
|
||||
{
|
||||
public event Action SourceChanged
|
||||
@ -92,12 +93,6 @@ namespace osu.Game.Rulesets.Catch.Tests
|
||||
public Texture GetTexture(string componentName) => throw new NotImplementedException();
|
||||
|
||||
public TValue GetValue<TConfiguration, TValue>(Func<TConfiguration, TValue> query) where TConfiguration : SkinConfiguration => throw new NotImplementedException();
|
||||
|
||||
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
|
||||
{
|
||||
((DependencyContainer)parent).CacheAs<ISkinSource>(this);
|
||||
return base.CreateChildDependencies(parent);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user