public static string ToString(this StatusKeys _key) { string keyStr = ""; switch (_key) { case StatusKeys.RECORDING: keyStr = "%RECORDING"; break; case StatusKeys.REPLAY: keyStr = "%REPLAY"; break; case StatusKeys.CURRENTSCENE: keyStr = "%CURRENTSCENE"; break; case StatusKeys.STREAMING: keyStr = "%STREAMING"; break; case StatusKeys.CURRENTPROFILE: keyStr = "%CURRENTPROFILE"; break; case StatusKeys.FILENAMEFORMAT: keyStr = "%FILENAMEFORMAT"; break; default: break; } return(keyStr); }
public async Task <StatusDto> GetByKeyAsync(StatusKeys key) { return(await _dbContext.Statuses .Where(s => s.Id == (int)key) .Select(s => s.AsDto()) .FirstOrDefaultAsync()); }
public async Task UpsertAsync(StatusKeys key, string value) { StatusDto dto = new StatusDto { Key = key, Value = value, }; await UpsertAsync(dto); }
public async Task <IActionResult> GetStatusByKey(StatusKeys key) { var response = await _statusService.GetByKeyAsync(key); if (response == null) { return(NotFound()); } return(Ok(response)); }
public async Task <StatusDto> GetByKeyAsync(StatusKeys key) { return(await Task.Run(() => new StatusDto())); }
public async Task <StatusDto> GetByKeyAsync(StatusKeys key) { return(await _statusRepository.GetByKeyAsync(key)); }