Amazon.CloudSearchDomain.Model.Internal.MarshallTransformations.SearchResponseUnmarshaller.Unmarshall C# (CSharp) Метод

Unmarshall() публичный Метод

Unmarshaller the response from the service to the response class.
public Unmarshall ( JsonUnmarshallerContext context ) : AmazonWebServiceResponse
context Amazon.Runtime.Internal.Transform.JsonUnmarshallerContext
Результат Amazon.Runtime.AmazonWebServiceResponse
        public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
        {
            SearchResponse response = new SearchResponse();

            context.Read();
            int targetDepth = context.CurrentDepth;
            while (context.ReadAtDepth(targetDepth))
            {
                if (context.TestExpression("facets", targetDepth))
                {
                    var unmarshaller = new DictionaryUnmarshaller<string, BucketInfo, StringUnmarshaller, BucketInfoUnmarshaller>(StringUnmarshaller.Instance, BucketInfoUnmarshaller.Instance);
                    response.Facets = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("hits", targetDepth))
                {
                    var unmarshaller = HitsUnmarshaller.Instance;
                    response.Hits = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("stats", targetDepth))
                {
                    var unmarshaller = new DictionaryUnmarshaller<string, FieldStats, StringUnmarshaller, FieldStatsUnmarshaller>(StringUnmarshaller.Instance, FieldStatsUnmarshaller.Instance);
                    response.Stats = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("status", targetDepth))
                {
                    var unmarshaller = SearchStatusUnmarshaller.Instance;
                    response.Status = unmarshaller.Unmarshall(context);
                    continue;
                }
            }

            return response;
        }