Mark all skin ctors used via reflection in SkinInfo.CreateInstance()

This commit is contained in:
Bartłomiej Dach
2021-05-12 22:18:15 +02:00
parent 77e422409c
commit 4464204e33
3 changed files with 5 additions and 0 deletions

View File

@ -1,6 +1,7 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text. // See the LICENCE file in the repository root for full licence text.
using JetBrains.Annotations;
using osu.Framework.IO.Stores; using osu.Framework.IO.Stores;
using osu.Game.IO; using osu.Game.IO;
using osuTK.Graphics; using osuTK.Graphics;
@ -9,6 +10,7 @@ namespace osu.Game.Skinning
{ {
public class DefaultLegacySkin : LegacySkin public class DefaultLegacySkin : LegacySkin
{ {
[UsedImplicitly(ImplicitUseKindFlags.InstantiatedWithFixedConstructorSignature)]
public DefaultLegacySkin(IResourceStore<byte[]> storage, IStorageResourceProvider resources) public DefaultLegacySkin(IResourceStore<byte[]> storage, IStorageResourceProvider resources)
: this(Info, storage, resources) : this(Info, storage, resources)
{ {

View File

@ -2,6 +2,7 @@
// See the LICENCE file in the repository root for full licence text. // See the LICENCE file in the repository root for full licence text.
using System.Collections.Generic; using System.Collections.Generic;
using JetBrains.Annotations;
using osu.Framework.Audio.Sample; using osu.Framework.Audio.Sample;
using osu.Framework.Bindables; using osu.Framework.Bindables;
using osu.Framework.Graphics; using osu.Framework.Graphics;
@ -20,6 +21,7 @@ namespace osu.Game.Skinning
{ {
} }
[UsedImplicitly(ImplicitUseKindFlags.InstantiatedWithFixedConstructorSignature)]
public DefaultSkin(SkinInfo skin, IStorageResourceProvider resources) public DefaultSkin(SkinInfo skin, IStorageResourceProvider resources)
: base(skin) : base(skin)
{ {

View File

@ -52,6 +52,7 @@ namespace osu.Game.Skinning
private readonly Dictionary<int, LegacyManiaSkinConfiguration> maniaConfigurations = new Dictionary<int, LegacyManiaSkinConfiguration>(); private readonly Dictionary<int, LegacyManiaSkinConfiguration> maniaConfigurations = new Dictionary<int, LegacyManiaSkinConfiguration>();
[UsedImplicitly(ImplicitUseKindFlags.InstantiatedWithFixedConstructorSignature)]
public LegacySkin(SkinInfo skin, IStorageResourceProvider resources) public LegacySkin(SkinInfo skin, IStorageResourceProvider resources)
: this(skin, new LegacySkinResourceStore<SkinFileInfo>(skin, resources.Files), resources, "skin.ini") : this(skin, new LegacySkinResourceStore<SkinFileInfo>(skin, resources.Files), resources, "skin.ini")
{ {