Dispose -> Destroy, windows icon color fix

This commit is contained in:
2022-02-08 11:26:35 +01:00
parent 755793c85c
commit 552362c6b3
24 changed files with 153 additions and 126 deletions

View File

@@ -33,7 +33,7 @@ namespace FileTime.Providers.Local
public bool SupportsDirectoryLevelSoftDelete => false;
public bool IsDisposed => false;
public bool IsDestroyed => false;
public LocalContentProvider(ILogger<LocalContentProvider> logger)
{
@@ -103,7 +103,7 @@ namespace FileTime.Providers.Local
public Task Rename(string newName) => throw new NotSupportedException();
public Task<bool> CanOpen() => Task.FromResult(true);
public void Dispose()
public void Destroy()
{
foreach (var c in _rootContainers)
{

View File

@@ -30,7 +30,7 @@ namespace FileTime.Providers.Local
private readonly LocalFolder _parent;
public bool IsDisposed { get; private set; }
public bool IsDestroyed { get; private set; }
public LocalFile(FileInfo file, LocalFolder parent, IContentProvider contentProvider)
{
@@ -86,6 +86,6 @@ namespace FileTime.Providers.Local
public async Task<string> GetContent(CancellationToken token = default) => await System.IO.File.ReadAllTextAsync(File.FullName, token);
public Task<long> GetElementSize(CancellationToken token = default) => Task.FromResult(File.Length);
public void Dispose() => IsDisposed = true;
public void Destroy() => IsDestroyed = true;
}
}

View File

@@ -34,7 +34,7 @@ namespace FileTime.Providers.Local
public DateTime CreatedAt => Directory.CreationTime;
public IReadOnlyList<Exception> Exceptions { get; }
public bool IsDisposed { get; private set; }
public bool IsDestroyed { get; private set; }
public bool SupportsDirectoryLevelSoftDelete { get; }
@@ -67,7 +67,7 @@ namespace FileTime.Providers.Local
{
foreach (var item in _items)
{
item.Dispose();
item.Destroy();
}
}
@@ -185,12 +185,12 @@ namespace FileTime.Providers.Local
}
public Task<bool> CanOpen() => Task.FromResult(true);
public void Dispose()
public void Destroy()
{
_items = null;
_containers = null;
_elements = null;
IsDisposed = true;
IsDestroyed = true;
Refreshed = new AsyncEventHandler();
}