public async void searchOperate(string text) { ProgressVisible = true; if (text != "") { FolderModel searchFolder; if (currentFolder != null) { searchFolder = currentFolder; backUpCurrentFolder = currentFolder; } else { searchFolder = backUpCurrentFolder; } FolderModel folderModel = new FolderModel(); folderModel.folderList = new List <FolderModel>(); folderModel.objList = new List <FileModel>(); List <ObjectListing> listObjectListing = await folderListModel.getObjectListing(searchFolder.bucketName, searchFolder.key); foreach (ObjectListing objectlisting in listObjectListing) { foreach (OssObjectSummary ossObj in objectlisting.ObjectSummaries) { if (ossObj.Key.EndsWith("/")) { if (FolderModel.lastName(ossObj.Key).Contains(text)) { FolderModel folder = new FolderModel() { bucketName = ossObj.BucketName, key = ossObj.Key }; folder.initial(); folderModel.folderList.Add(folder); } } else { if (FileModel.lastName(ossObj.Key).Contains(text)) { FileModel fileModel = new FileModel() { bucketName = ossObj.BucketName, key = ossObj.Key, Size = ossObj.Size }; fileModel.modifyTime = ossObj.LastModified; fileModel.initial(); folderModel.objList.Add(fileModel); } } } } currentFolder = null; refreshObjectList(folderModel); ProgressVisible = false; } }