1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-15 15:23:14 +08:00

Fix unsafe caching of dependencies

This commit is contained in:
smoogipoo 2019-06-24 13:37:06 +09:00
parent 03829611ae
commit 4cd8b6a2bd

View File

@ -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);
}
}
}
}