@@ -24,40 +24,6 @@ public NestSerializer(IConnectionSettingsValues settings)
2424 this . _serializationSettings = this . CreateSettings ( ) ;
2525 }
2626
27- ///// <summary>
28- ///// Returns a response of type R based on the connection status by trying parsing status.Result into R
29- ///// </summary>
30- ///// <returns></returns>
31- //public virtual R ToParsedResponse<R>(
32- // ElasticsearchResponse<R> status,
33- // bool notFoundIsAValidResponse = false,
34- // JsonConverter piggyBackJsonConverter = null
35- // ) where R : BaseResponse
36- //{
37- // var jsonSettings =piggyBackJsonConverter != null
38- // ? this.CreateSettings(piggyBackJsonConverter)
39- // : this._serializationSettings;
40-
41- // var isValid =
42- // (notFoundIsAValidResponse)
43- // ? (status.Error == null
44- // || status.Error.HttpStatusCode == System.Net.HttpStatusCode.NotFound)
45- // : (status.Error == null);
46-
47- // R r;
48- // if (!isValid)
49- // r = (R)typeof (R).CreateInstance();
50- // else
51- // r = JsonConvert.DeserializeObject<R>(status.Result, jsonSettings);
52-
53- // var baseResponse = r as BaseResponse;
54- // if (baseResponse == null)
55- // return null;
56- // baseResponse.IsValid = isValid;
57- // baseResponse.ConnectionStatus = status;
58- // return r;
59- //}
60-
6127 public virtual byte [ ] Serialize ( object data , SerializationFormatting formatting = SerializationFormatting . Indented )
6228 {
6329 var format = formatting == SerializationFormatting . None ? Formatting . None : Formatting . Indented ;
@@ -68,6 +34,10 @@ public virtual byte[] Serialize(object data, SerializationFormatting formatting
6834 /// <summary>
6935 /// Deserialize an object
7036 /// </summary>
37+ /// <typeparam name="T">The type you want to deserialize too</typeparam>
38+ /// <param name="response">If the type you want is a Nest Response you have to pass a response object</param>
39+ /// <param name="stream">The stream to deserialize off</param>
40+ /// <param name="deserializationState">Optional deserialization state</param>
7141 public virtual T Deserialize < T > ( IElasticsearchResponse response , Stream stream , object deserializationState = null )
7242 {
7343 var settings = this . _serializationSettings ;
0 commit comments