async CreateObjectChildren ?

Shell for WPF Forum

The latest build of this product (v2019.1 build 0685) was released 4 months ago, which was before this thread was created.
Posted 2 months ago by rex hui
Version: 19.1.0685
Avatar

We are extending the WindowsShellService class to handle ftp. If I understand it correctly, we should be overriding the CreateObjectChildren function and return the list of files and folders retrieved from the ftp server.

My question is the ftp operations obviously could take a while to complete and it will be blocking the UI if we use a synchronous ftp method. However we can't call an asynchronous ftp method since the CreateObjectChildren cannot be made into an async override.

Shouldn't Actipro be providing an async version of IShellService.CreateObjectChildren which returns a Task<IList<IShellObject>>?

Comments (2)

Posted 2 months ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Rex,

When our internal WindowsShellWatcher class detects new files, we update the parent IShellObject's Children list, and raise the IShellObject.Changed event with ShellObjectChangeKind.ChildAdded.  If you do that kind of thing, it should allow you to incrementally add them.


Actipro Software Support

Posted 1 month ago by rex hui
Avatar

Thanks. I think I kinda know what to do now.

Add Comment

Please log in to a validated account to post comments.