public async System.Threading.Tasks.Task <string?> GetAsync(string apiVersion, string deviceId, string date, string?sensorType) { var retVal = new DeviceMeasuredValues { Name = "Wrong API version" }; var result = Newtonsoft.Json.JsonConvert.SerializeObject(retVal); string?deviceMeasuredValues = apiVersion.ToUpper() switch { "V1" => await V1.GetValuesAsync(deviceId, date, sensorType), "F1" => await F1.GetValuesAsync(deviceId, date, sensorType), _ => result }; return(deviceMeasuredValues); } }