Ejemplo n.º 1
0
        public override async Task FollowUp()
        {
            var fileList = await _dropboxService.GetFileList(AuthorizationToken);

            ActivityUI.FileList.ListItems = fileList
                                            .Select(filePath => new ListItem {
                Key = Path.GetFileName(filePath), Value = Path.GetFileName(filePath)
            }).ToList();
            var file = await _dropboxService.GetFile(AuthorizationToken, "/" + ActivityUI.FileList.ListItems.Where(s => s.Key == ActivityUI.FileList.selectedKey).FirstOrDefault().Key);

            CrateSignaller.MarkAvailableAtRuntime <StandardFileDescriptionCM>("Dropbox selected file");
            Storage.ReplaceByLabel(Crate <StandardFileDescriptionCM> .FromContent("Dropbox selected file", file));


            CrateSignaller.MarkAvailableAtRuntime <StandardFileListCM>(RuntimeCrateLabel).AddFields(fileList.Select(f => Path.GetFileName(f)).ToArray());
            Storage.ReplaceByLabel(PackDropboxFileListCrate(fileList));
        }