mirror of
https://github.com/ppy/osu
synced 2025-01-30 09:52:23 +00:00
Tidy up various delegation implementations
This commit is contained in:
parent
d73c0ca659
commit
ca0765a932
@ -266,57 +266,23 @@ namespace osu.Game.Scoring
|
||||
});
|
||||
}
|
||||
|
||||
public void Delete(List<ScoreInfo> items, bool silent = false)
|
||||
{
|
||||
scoreModelManager.Delete(items, silent);
|
||||
}
|
||||
public void Delete(List<ScoreInfo> items, bool silent = false) => scoreModelManager.Delete(items, silent);
|
||||
|
||||
public void Undelete(List<ScoreInfo> items, bool silent = false)
|
||||
{
|
||||
scoreModelManager.Undelete(items, silent);
|
||||
}
|
||||
public void Undelete(List<ScoreInfo> items, bool silent = false) => scoreModelManager.Undelete(items, silent);
|
||||
|
||||
public void Undelete(ScoreInfo item)
|
||||
{
|
||||
scoreModelManager.Undelete(item);
|
||||
}
|
||||
public void Undelete(ScoreInfo item) => scoreModelManager.Undelete(item);
|
||||
|
||||
public Task Import(params string[] paths)
|
||||
{
|
||||
return scoreModelManager.Import(paths);
|
||||
}
|
||||
public Task Import(params string[] paths) => scoreModelManager.Import(paths);
|
||||
|
||||
public Task Import(params ImportTask[] tasks)
|
||||
{
|
||||
return scoreModelManager.Import(tasks);
|
||||
}
|
||||
public Task Import(params ImportTask[] tasks) => scoreModelManager.Import(tasks);
|
||||
|
||||
public IEnumerable<string> HandledExtensions => scoreModelManager.HandledExtensions;
|
||||
|
||||
public Task<IEnumerable<Live<ScoreInfo>>> Import(ProgressNotification notification, params ImportTask[] tasks)
|
||||
{
|
||||
return scoreModelManager.Import(notification, tasks);
|
||||
}
|
||||
public Task<IEnumerable<Live<ScoreInfo>>> Import(ProgressNotification notification, params ImportTask[] tasks) => scoreModelManager.Import(notification, tasks);
|
||||
|
||||
public Task<Live<ScoreInfo>> Import(ImportTask task, bool lowPriority = false, CancellationToken cancellationToken = default)
|
||||
{
|
||||
return scoreModelManager.Import(task, lowPriority, cancellationToken);
|
||||
}
|
||||
public Live<ScoreInfo> Import(ScoreInfo item, ArchiveReader archive = null, bool lowPriority = false, CancellationToken cancellationToken = default) => scoreModelManager.Import(item, archive, lowPriority, cancellationToken);
|
||||
|
||||
public Task<Live<ScoreInfo>> Import(ArchiveReader archive, bool lowPriority = false, CancellationToken cancellationToken = default)
|
||||
{
|
||||
return scoreModelManager.Import(archive, lowPriority, cancellationToken);
|
||||
}
|
||||
|
||||
public Live<ScoreInfo> Import(ScoreInfo item, ArchiveReader archive = null, bool lowPriority = false, CancellationToken cancellationToken = default)
|
||||
{
|
||||
return scoreModelManager.Import(item, archive, lowPriority, cancellationToken);
|
||||
}
|
||||
|
||||
public bool IsAvailableLocally(ScoreInfo model)
|
||||
{
|
||||
return scoreModelManager.IsAvailableLocally(model);
|
||||
}
|
||||
public bool IsAvailableLocally(ScoreInfo model) => scoreModelManager.IsAvailableLocally(model);
|
||||
|
||||
#endregion
|
||||
|
||||
|
@ -268,37 +268,21 @@ namespace osu.Game.Skinning
|
||||
set => skinModelManager.PostImport = value;
|
||||
}
|
||||
|
||||
public Task Import(params string[] paths)
|
||||
{
|
||||
return skinModelManager.Import(paths);
|
||||
}
|
||||
public Task Import(params string[] paths) => skinModelManager.Import(paths);
|
||||
|
||||
public Task Import(params ImportTask[] tasks)
|
||||
{
|
||||
return skinModelManager.Import(tasks);
|
||||
}
|
||||
public Task Import(params ImportTask[] tasks) => skinModelManager.Import(tasks);
|
||||
|
||||
public IEnumerable<string> HandledExtensions => skinModelManager.HandledExtensions;
|
||||
|
||||
public Task<IEnumerable<Live<SkinInfo>>> Import(ProgressNotification notification, params ImportTask[] tasks)
|
||||
{
|
||||
return skinModelManager.Import(notification, tasks);
|
||||
}
|
||||
public Task<IEnumerable<Live<SkinInfo>>> Import(ProgressNotification notification, params ImportTask[] tasks) => skinModelManager.Import(notification, tasks);
|
||||
|
||||
public Task<Live<SkinInfo>> Import(ImportTask task, bool lowPriority = false, CancellationToken cancellationToken = default)
|
||||
{
|
||||
return skinModelManager.Import(task, lowPriority, cancellationToken);
|
||||
}
|
||||
public Task<Live<SkinInfo>> Import(ImportTask task, bool lowPriority = false, CancellationToken cancellationToken = default) => skinModelManager.Import(task, lowPriority, cancellationToken);
|
||||
|
||||
public Task<Live<SkinInfo>> Import(ArchiveReader archive, bool lowPriority = false, CancellationToken cancellationToken = default)
|
||||
{
|
||||
return skinModelManager.Import(archive, lowPriority, cancellationToken);
|
||||
}
|
||||
public Task<Live<SkinInfo>> Import(ArchiveReader archive, bool lowPriority = false, CancellationToken cancellationToken = default) =>
|
||||
skinModelManager.Import(archive, lowPriority, cancellationToken);
|
||||
|
||||
public Live<SkinInfo> Import(SkinInfo item, ArchiveReader archive = null, bool lowPriority = false, CancellationToken cancellationToken = default)
|
||||
{
|
||||
return skinModelManager.Import(item, archive, lowPriority, cancellationToken);
|
||||
}
|
||||
public Live<SkinInfo> Import(SkinInfo item, ArchiveReader archive = null, bool lowPriority = false, CancellationToken cancellationToken = default) =>
|
||||
skinModelManager.Import(item, archive, lowPriority, cancellationToken);
|
||||
|
||||
#endregion
|
||||
|
||||
@ -323,46 +307,22 @@ namespace osu.Game.Skinning
|
||||
});
|
||||
}
|
||||
|
||||
public bool Delete(SkinInfo item) => skinModelManager.Delete(item);
|
||||
|
||||
public void Delete(List<SkinInfo> items, bool silent = false) => skinModelManager.Delete(items, silent);
|
||||
|
||||
public void Undelete(List<SkinInfo> items, bool silent = false) => skinModelManager.Undelete(items, silent);
|
||||
|
||||
public void Undelete(SkinInfo item) => skinModelManager.Undelete(item);
|
||||
|
||||
public bool IsAvailableLocally(SkinInfo model) => skinModelManager.IsAvailableLocally(model);
|
||||
|
||||
public void ReplaceFile(SkinInfo model, RealmNamedFileUsage file, Stream contents) => skinModelManager.ReplaceFile(model, file, contents);
|
||||
|
||||
public void DeleteFile(SkinInfo model, RealmNamedFileUsage file) => skinModelManager.DeleteFile(model, file);
|
||||
|
||||
public void AddFile(SkinInfo model, Stream contents, string filename) => skinModelManager.AddFile(model, contents, filename);
|
||||
|
||||
#endregion
|
||||
|
||||
public bool Delete(SkinInfo item)
|
||||
{
|
||||
return skinModelManager.Delete(item);
|
||||
}
|
||||
|
||||
public void Delete(List<SkinInfo> items, bool silent = false)
|
||||
{
|
||||
skinModelManager.Delete(items, silent);
|
||||
}
|
||||
|
||||
public void Undelete(List<SkinInfo> items, bool silent = false)
|
||||
{
|
||||
skinModelManager.Undelete(items, silent);
|
||||
}
|
||||
|
||||
public void Undelete(SkinInfo item)
|
||||
{
|
||||
skinModelManager.Undelete(item);
|
||||
}
|
||||
|
||||
public bool IsAvailableLocally(SkinInfo model)
|
||||
{
|
||||
return skinModelManager.IsAvailableLocally(model);
|
||||
}
|
||||
|
||||
public void ReplaceFile(SkinInfo model, RealmNamedFileUsage file, Stream contents)
|
||||
{
|
||||
skinModelManager.ReplaceFile(model, file, contents);
|
||||
}
|
||||
|
||||
public void DeleteFile(SkinInfo model, RealmNamedFileUsage file)
|
||||
{
|
||||
skinModelManager.DeleteFile(model, file);
|
||||
}
|
||||
|
||||
public void AddFile(SkinInfo model, Stream contents, string filename)
|
||||
{
|
||||
skinModelManager.AddFile(model, contents, filename);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -39,9 +39,6 @@ namespace osu.Game.Stores
|
||||
|
||||
protected override string[] HashableFileTypes => new[] { ".osu" };
|
||||
|
||||
// protected override bool CheckLocalAvailability(RealmBeatmapSet model, System.Linq.IQueryable<RealmBeatmapSet> items)
|
||||
// => base.CheckLocalAvailability(model, items) || (model.OnlineID > -1));
|
||||
|
||||
private readonly BeatmapOnlineLookupQueue? onlineLookupQueue;
|
||||
|
||||
protected BeatmapImporter(RealmAccess realm, Storage storage, BeatmapOnlineLookupQueue? onlineLookupQueue = null)
|
||||
|
Loading…
Reference in New Issue
Block a user