Optimalization, file name&extension
This commit is contained in:
@@ -103,6 +103,20 @@ namespace FileTime.Providers.Local
|
||||
public Task Rename(string newName) => throw new NotSupportedException();
|
||||
public Task<bool> CanOpen() => Task.FromResult(true);
|
||||
|
||||
public void Dispose() { }
|
||||
public void Dispose()
|
||||
{
|
||||
foreach (var c in _rootContainers)
|
||||
{
|
||||
c.Unload();
|
||||
}
|
||||
}
|
||||
|
||||
public void Unload()
|
||||
{
|
||||
foreach (var c in _rootContainers)
|
||||
{
|
||||
c.Unload();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -27,7 +27,7 @@ namespace FileTime.Providers.Local
|
||||
public SupportsDelete CanDelete { get; }
|
||||
public bool CanRename => true;
|
||||
|
||||
public AsyncEventHandler Refreshed { get; } = new();
|
||||
public AsyncEventHandler Refreshed { get; private set; } = new();
|
||||
|
||||
public string Attributes => GetAttributes();
|
||||
|
||||
@@ -191,6 +191,14 @@ namespace FileTime.Providers.Local
|
||||
_containers = null;
|
||||
_elements = null;
|
||||
IsDisposed = true;
|
||||
Refreshed = new AsyncEventHandler();
|
||||
}
|
||||
|
||||
public void Unload()
|
||||
{
|
||||
_items = null;
|
||||
_containers = null;
|
||||
_elements = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user