public Task Handle(WhiteListFolders request)
 {
     foreach (var f in request.Folders.Select(x => x.ToAbsoluteDirectoryPath()))
     {
         _folderHandler.WhiteListFolder(f);
     }
     //await Store(request);
     return(Task.FromResult(Unit.Value));
 }
Example #2
0
        public async Task <string> Handle(PrepareFolder request)
        {
            // open dialog, ask for folder
            var folder =
                await
                _dialogManager.BrowseForFolder(title : "Select folder to upload to the withSIX network")
                .ConfigureAwait(false);

            if (folder == null)
            {
                throw new OperationCanceledException("The user cancelled the operation");
            }
            // TODO: Restructure suggestions etc?
            _folderHandler.WhiteListFolder(folder.ToAbsoluteDirectoryPath());
            return(folder);
        }