Amazon.DirectConnect.Model.Internal.MarshallTransformations.DescribeVirtualGatewaysResponseUnmarshaller.UnmarshallResult C# (CSharp) Метод

UnmarshallResult() приватный статический Метод

private static UnmarshallResult ( JsonUnmarshallerContext context, DescribeVirtualGatewaysResponse response ) : void
context Amazon.Runtime.Internal.Transform.JsonUnmarshallerContext
response Amazon.DirectConnect.Model.DescribeVirtualGatewaysResponse
Результат void
        private static void UnmarshallResult(JsonUnmarshallerContext context,DescribeVirtualGatewaysResponse response)
        {
          
            int originalDepth = context.CurrentDepth;
            int targetDepth = originalDepth + 1;
            while (context.Read())
            {
              
              if (context.TestExpression("virtualGateways", targetDepth))
              {
                context.Read();
                response.VirtualGateways = new List<VirtualGateway>();
                        VirtualGatewayUnmarshaller unmarshaller = VirtualGatewayUnmarshaller.GetInstance();
                while (context.Read())
                {
                  JsonToken token = context.CurrentTokenType;                
                  if (token == JsonToken.ArrayStart)
                  {
                    continue;
                  }
                  if (token == JsonToken.ArrayEnd)
                  {
                    break;
                  }
                   response.VirtualGateways.Add(unmarshaller.Unmarshall(context));
                }
                continue;
              }
  
                if (context.CurrentDepth <= originalDepth)
                {                   
                    return;
                }
            }
                        
            return;
        }