1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 16:02:55 +08:00

User IEnumerable for HandledExtensions

This commit is contained in:
Dean Herbert 2020-10-02 16:17:10 +09:00
parent f3c8cd91f4
commit 50eca202f4
6 changed files with 7 additions and 6 deletions

View File

@ -57,7 +57,7 @@ namespace osu.Game.Beatmaps
/// </summary>
public readonly WorkingBeatmap DefaultBeatmap;
public override string[] HandledExtensions => new[] { ".osz" };
public override IEnumerable<string> HandledExtensions => new[] { ".osz" };
protected override string[] HashableFileTypes => new[] { ".osu" };

View File

@ -70,7 +70,7 @@ namespace osu.Game.Database
private readonly Bindable<WeakReference<TModel>> itemRemoved = new Bindable<WeakReference<TModel>>();
public virtual string[] HandledExtensions => new[] { ".zip" };
public virtual IEnumerable<string> HandledExtensions => new[] { ".zip" };
public virtual bool SupportsImportFromStable => RuntimeInfo.IsDesktop;

View File

@ -1,6 +1,7 @@
// 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.
using System.Collections.Generic;
using System.Threading.Tasks;
namespace osu.Game.Database
@ -19,6 +20,6 @@ namespace osu.Game.Database
/// <summary>
/// An array of accepted file extensions (in the standard format of ".abc").
/// </summary>
string[] HandledExtensions { get; }
IEnumerable<string> HandledExtensions { get; }
}
}

View File

@ -366,7 +366,7 @@ namespace osu.Game
}
}
public string[] HandledExtensions => fileImporters.SelectMany(i => i.HandledExtensions).ToArray();
public IEnumerable<string> HandledExtensions => fileImporters.SelectMany(i => i.HandledExtensions);
protected override void Dispose(bool isDisposing)
{

View File

@ -27,7 +27,7 @@ namespace osu.Game.Scoring
{
public class ScoreManager : DownloadableArchiveModelManager<ScoreInfo, ScoreFileInfo>
{
public override string[] HandledExtensions => new[] { ".osr" };
public override IEnumerable<string> HandledExtensions => new[] { ".osr" };
protected override string[] HashableFileTypes => new[] { ".osr" };

View File

@ -33,7 +33,7 @@ namespace osu.Game.Skinning
public readonly Bindable<Skin> CurrentSkin = new Bindable<Skin>(new DefaultSkin());
public readonly Bindable<SkinInfo> CurrentSkinInfo = new Bindable<SkinInfo>(SkinInfo.Default) { Default = SkinInfo.Default };
public override string[] HandledExtensions => new[] { ".osk" };
public override IEnumerable<string> HandledExtensions => new[] { ".osk" };
protected override string[] HashableFileTypes => new[] { ".ini" };