Beispiel #1
0
        public async Task Delete(object objectToBeDeletedKeyValue)
        {
            var filePath = GetFullPath(objectToBeDeletedKeyValue.ToString());

            StorageOperationStarted?.Invoke(filePath);
            await _fileService.Delete(filePath);

            StorageOperationFinished?.Invoke(filePath);
        }
Beispiel #2
0
        public async Task Save(TDataObject objectToBeSaved)
        {
            Directory.CreateDirectory(GetBasePath());
            var keyValue = _dataObjectKeyProperty.GetValue(objectToBeSaved);
            var filePath = GetFullPath(keyValue.ToString());

            StorageOperationStarted?.Invoke(filePath);
            await _fileService.Save(objectToBeSaved, filePath);

            StorageOperationFinished?.Invoke(filePath);
        }