mirror of
https://github.com/ppy/osu.git
synced 2025-02-20 00:52:56 +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
|
private class CatchCustomSkinSourceContainer : Container, ISkinSource
|
||||||
{
|
{
|
||||||
public event Action SourceChanged
|
public event Action SourceChanged
|
||||||
@ -92,12 +93,6 @@ namespace osu.Game.Rulesets.Catch.Tests
|
|||||||
public Texture GetTexture(string componentName) => throw new NotImplementedException();
|
public Texture GetTexture(string componentName) => throw new NotImplementedException();
|
||||||
|
|
||||||
public TValue GetValue<TConfiguration, TValue>(Func<TConfiguration, TValue> query) where TConfiguration : SkinConfiguration => 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