Add type constraints for resource managers. Generalize detail panel.
This commit is contained in:
@@ -5,7 +5,7 @@ namespace Cryville.Crtr.Browsing {
|
||||
public interface IResourceManager {
|
||||
int Count { get; }
|
||||
|
||||
object this[int index] { get; }
|
||||
IResourceMeta this[int index] { get; }
|
||||
Uri GetItemUri(int index);
|
||||
|
||||
event Action ItemChanged;
|
||||
@@ -16,10 +16,10 @@ namespace Cryville.Crtr.Browsing {
|
||||
void Activate();
|
||||
void Deactivate();
|
||||
}
|
||||
public interface IResourceManager<T> : IResourceManager {
|
||||
public interface IResourceManager<out T> : IResourceManager where T : IResourceMeta {
|
||||
new T this[int index] { get; }
|
||||
}
|
||||
public interface IPathedResourceManager<T> : IResourceManager<T> {
|
||||
public interface IPathedResourceManager<out T> : IResourceManager<T> where T : IResourceMeta {
|
||||
event Action DirectoryChanged;
|
||||
IList<string> CurrentDirectory { get; }
|
||||
void ChangeDirectory(IEnumerable<string> dir);
|
||||
|
Reference in New Issue
Block a user