private async Task <T> ReadAsAsync <T>(HttpResponseMessage response, IFormatProvider <T> formatter) { if (!response.IsSuccessStatusCode) { throw new Exception(string.Concat(response.StatusCode, ":", response.ReasonPhrase)); } var content = await response.Content.ReadAsStringAsync(); return(formatter.Format(content)); }
private void OnNext() { var value = _formatProvider != null ? _formatProvider.Format(_values.ConvertAll(s => s.ToString())) : string.Empty; if (value != _value) { _value = value; NotifyNext(); } }