Ejemplo n.º 1
0
 /// <summary>
 /// Read the response string from the response, deserialize, and return a deserialized object
 /// </summary>
 /// <typeparam name="T">Type of object to deserialize into</typeparam>
 /// <param name="content">String content read from the response</param>
 /// <param name="response">HttpResponseMessage. Consider calling response.Content.ReadAsStringAsync() to retrieve a string</param>
 /// <param name="info">Extra information about the response</param>
 /// <returns>Deserialized response</returns>
 public virtual T Deserialize <T>(string?content, HttpResponseMessage response, ResponseDeserializerInfo info)
 {
     throw new NotImplementedException($"You must override and implement T Deserialize<T>(string content, HttpResponseMessage response, ResponseDeserializerInfo info) in {this.GetType().Name}");
 }
Ejemplo n.º 2
0
 /// <inheritdoc/>
 public override T Deserialize <T>(string?content, HttpResponseMessage response, ResponseDeserializerInfo info)
 {
     return(JsonConvert.DeserializeObject <T>(content, this.JsonSerializerSettings));
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Read the response string from the response, deserialize, and return a deserialized object
 /// </summary>
 /// <typeparam name="T">Type of object to deserialize into</typeparam>
 /// <param name="content">String content read from the response</param>
 /// <param name="response">HttpResponseMessage. Consider calling response.Content.ReadAsStringAsync() to retrieve a string</param>
 /// <param name="info">Extra information about the response</param>
 /// <returns>Deserialized response</returns>
 public virtual T Deserialize <T>(string content, HttpResponseMessage response, ResponseDeserializerInfo info)
 {
     throw new NotImplementedException("You must override and implement T Deserialize<T>(string content, HttpResponseMessage response, ResponseDeserializerInfo info)");
 }