public async Task Delete(object objectToBeDeletedKeyValue) { var filePath = GetFullPath(objectToBeDeletedKeyValue.ToString()); StorageOperationStarted?.Invoke(filePath); await _fileService.Delete(filePath); StorageOperationFinished?.Invoke(filePath); }
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); }