IconProvider, container exceptions, refactor
This commit is contained in:
@@ -25,6 +25,7 @@ namespace FileTime.Providers.Smb
|
||||
public IContentProvider Provider => this;
|
||||
public bool CanDelete => false;
|
||||
public bool CanRename => false;
|
||||
public IReadOnlyList<Exception> Exceptions { get; } = new List<Exception>().AsReadOnly();
|
||||
|
||||
public AsyncEventHandler Refreshed { get; } = new();
|
||||
|
||||
@@ -98,5 +99,6 @@ namespace FileTime.Providers.Smb
|
||||
public Task<IReadOnlyList<IElement>?> GetElements(CancellationToken token = default) => Task.FromResult(_elements);
|
||||
|
||||
public Task Rename(string newName) => throw new NotSupportedException();
|
||||
public Task<bool> CanOpen() => Task.FromResult(true);
|
||||
}
|
||||
}
|
||||
@@ -27,6 +27,7 @@ namespace FileTime.Providers.Smb
|
||||
public bool CanRename => true;
|
||||
|
||||
public AsyncEventHandler Refreshed { get; } = new();
|
||||
public IReadOnlyList<Exception> Exceptions { get; } = new List<Exception>().AsReadOnly();
|
||||
|
||||
public SmbFolder(string name, SmbContentProvider contentProvider, SmbShare smbShare, IContainer parent)
|
||||
{
|
||||
@@ -119,5 +120,6 @@ namespace FileTime.Providers.Smb
|
||||
if (_elements == null) await Refresh();
|
||||
return _elements;
|
||||
}
|
||||
public Task<bool> CanOpen() => Task.FromResult(true);
|
||||
}
|
||||
}
|
||||
@@ -32,8 +32,9 @@ namespace FileTime.Providers.Smb
|
||||
public SmbContentProvider Provider { get; }
|
||||
|
||||
IContentProvider IItem.Provider => Provider;
|
||||
public bool CanDelete => false;
|
||||
public bool CanDelete => true;
|
||||
public bool CanRename => false;
|
||||
public IReadOnlyList<Exception> Exceptions { get; } = new List<Exception>().AsReadOnly();
|
||||
|
||||
public AsyncEventHandler Refreshed { get; } = new();
|
||||
|
||||
@@ -186,5 +187,6 @@ namespace FileTime.Providers.Smb
|
||||
}
|
||||
|
||||
public Task Rename(string newName) => throw new NotSupportedException();
|
||||
public Task<bool> CanOpen() => Task.FromResult(true);
|
||||
}
|
||||
}
|
||||
@@ -27,6 +27,7 @@ namespace FileTime.Providers.Smb
|
||||
public bool CanRename => false;
|
||||
|
||||
public AsyncEventHandler Refreshed { get; } = new();
|
||||
public IReadOnlyList<Exception> Exceptions { get; } = new List<Exception>().AsReadOnly();
|
||||
|
||||
public SmbShare(string name, SmbContentProvider contentProvider, IContainer parent, SmbClientContext smbClientContext)
|
||||
{
|
||||
@@ -156,5 +157,6 @@ namespace FileTime.Providers.Smb
|
||||
}
|
||||
|
||||
public Task Rename(string newName) => throw new NotSupportedException();
|
||||
public Task<bool> CanOpen() => Task.FromResult(true);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user