public async Task Update(double volume, CancellationToken cancellationToken) { var globalVolume = await _globalVolumeRepository.GetGlobalVolume(cancellationToken); globalVolume.Volume.Value = volume; await _globalVolumeRepository.SaveGlobalVolume(globalVolume, cancellationToken); }
public async Task <double> GetGlobalVolume(CancellationToken cancellationToken) { var globalVolume = await _globalVolumeRepository.GetGlobalVolume(cancellationToken); return(globalVolume.Volume.Value); }