Dispose -> Destroy, windows icon color fix
This commit is contained in:
@@ -287,7 +287,7 @@ namespace FileTime.Core.Components
|
||||
|
||||
foreach (var lastLocationItem in currentLocationItems.OfType<IContainer>())
|
||||
{
|
||||
lastLocationItem.Dispose();
|
||||
lastLocationItem.Destroy();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,15 +2,16 @@ using FileTime.Core.Providers;
|
||||
|
||||
namespace FileTime.Core.Models
|
||||
{
|
||||
public interface IItem : IDisposable
|
||||
public interface IItem
|
||||
{
|
||||
string Name { get; }
|
||||
string? FullName { get; }
|
||||
bool IsHidden { get; }
|
||||
bool IsDisposed { get; }
|
||||
bool IsDestroyed { get; }
|
||||
SupportsDelete CanDelete { get; }
|
||||
bool CanRename { get; }
|
||||
IContentProvider Provider { get; }
|
||||
void Destroy();
|
||||
Task Delete(bool hardDelete = false);
|
||||
Task Rename(string newName);
|
||||
IContainer? GetParent();
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace FileTime.Core.Models
|
||||
|
||||
public AsyncEventHandler Refreshed { get; }
|
||||
|
||||
public bool IsDisposed => BaseContainer.IsDisposed;
|
||||
public bool IsDestroyed => BaseContainer.IsDestroyed;
|
||||
|
||||
private void RefreshAddBase(Func<object?, AsyncEventArgs, CancellationToken, Task> handler)
|
||||
{
|
||||
@@ -171,9 +171,9 @@ namespace FileTime.Core.Models
|
||||
public async Task Rename(string newName) => await BaseContainer.Rename(newName);
|
||||
public async Task<bool> CanOpen() => await BaseContainer.CanOpen();
|
||||
|
||||
public void Dispose()
|
||||
public void Destroy()
|
||||
{
|
||||
BaseContainer.Dispose();
|
||||
BaseContainer.Destroy();
|
||||
}
|
||||
|
||||
public void Unload()
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace FileTime.Core.Providers
|
||||
|
||||
public bool SupportsDirectoryLevelSoftDelete => false;
|
||||
|
||||
public bool IsDisposed => false;
|
||||
public bool IsDestroyed => false;
|
||||
|
||||
public TopContainer(IEnumerable<IContentProvider> contentProviders)
|
||||
{
|
||||
@@ -71,7 +71,7 @@ namespace FileTime.Core.Providers
|
||||
|
||||
public Task<bool> CanOpen() => Task.FromResult(true);
|
||||
|
||||
public void Dispose() { }
|
||||
public void Destroy() { }
|
||||
|
||||
public void Unload() { }
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace FileTime.Core.Timeline
|
||||
|
||||
public bool SupportsDirectoryLevelSoftDelete => false;
|
||||
|
||||
public bool IsDisposed { get; private set; }
|
||||
public bool IsDestroyed { get; private set; }
|
||||
|
||||
public TimeContainer(string name, IContainer parent, IContentProvider contentProvider, IContentProvider virtualContentProvider, PointInTime pointInTime)
|
||||
{
|
||||
@@ -124,7 +124,7 @@ namespace FileTime.Core.Timeline
|
||||
}
|
||||
public Task<bool> CanOpen() => Task.FromResult(true);
|
||||
|
||||
public void Dispose() => IsDisposed = true;
|
||||
public void Destroy() => IsDestroyed = true;
|
||||
public void Unload() { }
|
||||
}
|
||||
}
|
||||
@@ -31,7 +31,7 @@ namespace FileTime.Core.Timeline
|
||||
public IContentProvider Provider { get; }
|
||||
public IContentProvider VirtualProvider { get; }
|
||||
|
||||
public bool IsDisposed { get; private set; }
|
||||
public bool IsDestroyed { get; private set; }
|
||||
|
||||
public Task Delete(bool hardDelete = false) => Task.CompletedTask;
|
||||
|
||||
@@ -44,6 +44,6 @@ namespace FileTime.Core.Timeline
|
||||
public Task<string> GetContent(CancellationToken token = default) => Task.FromResult("");
|
||||
public Task<long> GetElementSize(CancellationToken token = default) => Task.FromResult(-1L);
|
||||
|
||||
public void Dispose() => IsDisposed = true;
|
||||
public void Destroy() => IsDestroyed = true;
|
||||
}
|
||||
}
|
||||
@@ -28,7 +28,7 @@ namespace FileTime.Core.Timeline
|
||||
|
||||
public bool SupportsDirectoryLevelSoftDelete => false;
|
||||
|
||||
public bool IsDisposed => false;
|
||||
public bool IsDestroyed => false;
|
||||
|
||||
public TimeProvider(PointInTime pointInTime)
|
||||
{
|
||||
@@ -93,7 +93,7 @@ namespace FileTime.Core.Timeline
|
||||
public void SetParent(IContainer container) { }
|
||||
public Task<bool> CanOpen() => Task.FromResult(true);
|
||||
|
||||
public void Dispose() { }
|
||||
public void Destroy() { }
|
||||
|
||||
public void Unload() { }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user