public async Task AddAsync(StorageFile file) { Guard.NotNull(file, nameof(file)); var model = allFiles.OfType <DocumentFileModel>().FirstOrDefault(x => string.Equals(x.Path, file.Path, StringComparison.OrdinalIgnoreCase)); if (model == null) { model = new DocumentFileModel(await DocumentFile.OpenAsync(file, false), dialogService); allFiles.Insert(0, model); } await OpenAsync(model); }
public Task <bool> OpenAsync(bool hideDialogs = false) { return(DoAsync("Opening", () => documentFile.OpenAsync(), hideDialogs)); }