-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
[Help Wanted] dev/lubl/file-enum #12601
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some nits from initial glance
/// <summary> | ||
/// Represents a watcher for the trash bin | ||
/// </summary> | ||
public interface ITrashWatcher : IWatcher |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about we use or inherit from IFolderWatcher
?
|
||
namespace Files.Sdk.Storage.MutableStorage | ||
{ | ||
/// <summary> | ||
/// A disposable object which can notify of changes to the folder. | ||
/// </summary> | ||
public interface IFolderWatcher : INotifyCollectionChanged, IDisposable, IAsyncDisposable | ||
public interface IFolderWatcher : INotifyCollectionChanged, IDisposable, IAsyncDisposable, IWatcher |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change tracking events are already supplemented by INotifyCollectionChanged
/// <summary> | ||
/// Starts the watcher | ||
/// </summary> | ||
void Start(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Retrieving IFolderWatcher
assumes that it's already tracking for changes.
/// <summary> | ||
/// Stops the watcher | ||
/// </summary> | ||
void Stop(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stopping the IFolderWatcher
is done through either IDisposable.Dispose()
or IAsyncDisposable.DisposeAsync()
@@ -197,5 +199,43 @@ public async Task<IFolder> CreateFolderAsync(string desiredName, CreationCollisi | |||
|
|||
return new FtpStorageFolder(newPath, desiredName); | |||
} | |||
|
|||
public async IAsyncEnumerable<IStorable> SearchAsync(string userQuery, SearchDepth depth = SearchDepth.Shallow) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this be an extension method?
/// </summary> | ||
/// <param name="userQuery">A string containing specific terms which influence search results</param> | ||
/// <returns>The search results produced by the query</returns> | ||
IAsyncEnumerable<IStorable> SearchAsync(string userQuery, SearchDepth depth = SearchDepth.Shallow); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it's a necessity, add another interface that'd provide the search function (e.g.: ISearchableFolder
)
Hi! Why was this pull request closed? 🤔 |
Resolved / Related Issues
Closes #issue...
Validation
How did you test these changes?
Screenshots (optional)
Add screenshots here.