Amazon.APIGateway.Model.Internal.MarshallTransformations.GetUsageResponseUnmarshaller.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)
        {
            GetUsageResponse response = new GetUsageResponse();

            context.Read();
            int targetDepth = context.CurrentDepth;
            while (context.ReadAtDepth(targetDepth))
            {
                if (context.TestExpression("endDate", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.EndDate = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("values", targetDepth))
                {
                    var unmarshaller = new DictionaryUnmarshaller<string, List<List<long>>, StringUnmarshaller, ListUnmarshaller<List<long>, ListUnmarshaller<long, LongUnmarshaller>>>(StringUnmarshaller.Instance, new ListUnmarshaller<List<long>, ListUnmarshaller<long, LongUnmarshaller>>(new ListUnmarshaller<long, LongUnmarshaller>(LongUnmarshaller.Instance)));
                    response.Items = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("position", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.Position = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("startDate", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.StartDate = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("usagePlanId", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.UsagePlanId = unmarshaller.Unmarshall(context);
                    continue;
                }
            }

            return response;
        }