Exemplo n.º 1
0
        public async Task RemoveDatabaseAsync(IFile dbFile)
        {
            var token = dbFile.IdFromPath();

            _accessList.Remove(GetDatabaseToken(token));

            var keyToken = GetKeyToken(token);

            if (_accessList.ContainsItem(keyToken))
            {
                _accessList.Remove(keyToken);
            }

            var folder = await _folder;

            try
            {
                var file = await folder.GetFileAsync((string)token);

                await file.DeleteAsync(StorageDeleteOption.PermanentDelete);
            }
            catch (Exception)
            {
            }
        }