public void GetMedicalProviders(SearchCriteria criteria) { var bytes = criteria.ConvertToByteArray(); string url = UrlAddresses.GetMedicalProviders; rest.Post(url, bytes, (content) => { var collection = JsonConvert.DeserializeObject<List<MedicalProvider>>(content); if (MedicalProviderRetrievedCompleted != null) MedicalProviderRetrievedCompleted(collection); }); }
public void GetMedicalProviders() { var net = new NetworkStorage (); net.MedicalProviderRetrievedCompleted += (data) => { Assert.AreNotEqual (0, data.Count); foreach (var mp in data) { Debug.WriteLine (mp.FirstName + " " + mp.LastName); } }; SearchCriteria criteria = new SearchCriteria (){ City="Tucson"}; net.GetMedicalProviders (criteria); }