public string GetSymptoms() { string symptomsResponse = m_actualProvider.GetSymptoms(); File.WriteAllText(@"..\..\cache\symptomsResponse.json", symptomsResponse); return(symptomsResponse); }
public IEnumerable <Symptom> SelectSymptoms(Func <Symptom, bool> request) { string jsonReply = m_dataProvider.GetSymptoms(); IEnumerable <dynamic> symptoms = (IEnumerable <dynamic>)JsonConvert.DeserializeObject(jsonReply); IEnumerable <Symptom> symptomsList = symptoms.Select((dynamic symptom) => { int id = Convert.ToInt32(symptom.ID.Value); string name = Convert.ToString(symptom.Name.Value); return(new Symptom(id, name)); }).Where(request); return(symptomsList); }