Exemple #1
0
        public async Task RemoveSnapshotContentAsync(LocationSnapshot snapshot)
        {
            _miniaturesCache.RemoveSnapshotMiniature(snapshot.Id);

            var picturesUrl = await GetPicturesUrl();

            picturesUrl = $"{picturesUrl}/{snapshot.PictureFileName}";

            await _webClient.DeleteAsync <object>(picturesUrl);
        }
Exemple #2
0
        public async Task RemoveSnapshotContentAsync(LocationSnapshot snapshot)
        {
            _miniaturesCache.RemoveSnapshotMiniature(snapshot.Id);

            try
            {
                var picturesFolder = KnownFolders.CameraRoll;
                var pictureFile    = await picturesFolder.GetFileAsync(snapshot.PictureFileName);

                await pictureFile.DeleteAsync();
            }
            catch
            {
                // Picture does not exist in the specified location
            }
        }