Adapt resource manager to URI and list pattern.

This commit is contained in:
2023-11-13 00:26:18 +08:00
parent 9fcf6f3379
commit 8c11be48cf
4 changed files with 62 additions and 72 deletions

View File

@@ -2,14 +2,10 @@ using System;
using System.Collections.Generic;
namespace Cryville.Crtr.Browsing {
public interface IResourceManager<T> {
int ItemCount { get; }
public interface IResourceManager<T> : IReadOnlyList<T> {
Uri GetItemUri(int id);
ResourceItemMeta GetItemMeta(int id);
T GetItemDetail(int id);
string GetItemPath(int id);
bool ImportItemFrom(string path);
bool ImportItemFrom(Uri uri);
string[] GetSupportedFormats();
IReadOnlyDictionary<string, string> GetPresetPaths();