예제 #1
0
        public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
        {
            ActivateGatewayResponse response = new ActivateGatewayResponse();

            context.Read();
            response.ActivateGatewayResult = ActivateGatewayResultUnmarshaller.GetInstance().Unmarshall(context);

            return(response);
        }
예제 #2
0
        public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
        {
            ActivateGatewayResponse response = new ActivateGatewayResponse();

            context.Read();

            UnmarshallResult(context, response);
            return(response);
        }
        public static ActivateGatewayResponse Unmarshall(UnmarshallerContext context)
        {
            ActivateGatewayResponse activateGatewayResponse = new ActivateGatewayResponse();

            activateGatewayResponse.HttpResponse = context.HttpResponse;
            activateGatewayResponse.RequestId    = context.StringValue("ActivateGateway.RequestId");
            activateGatewayResponse.Success      = context.BooleanValue("ActivateGateway.Success");
            activateGatewayResponse.Code         = context.StringValue("ActivateGateway.Code");
            activateGatewayResponse.Message      = context.StringValue("ActivateGateway.Message");
            activateGatewayResponse.GatewayId    = context.StringValue("ActivateGateway.GatewayId");
            activateGatewayResponse.RegionId     = context.StringValue("ActivateGateway.RegionId");

            return(activateGatewayResponse);
        }
        public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
        {
            ActivateGatewayResponse response = new ActivateGatewayResponse();

            context.Read();
            int targetDepth = context.CurrentDepth;

            while (context.ReadAtDepth(targetDepth))
            {
                if (context.TestExpression("GatewayARN", targetDepth))
                {
                    response.GatewayARN = StringUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }
            }

            return(response);
        }
예제 #5
0
        private static void UnmarshallResult(JsonUnmarshallerContext context, ActivateGatewayResponse response)
        {
            int originalDepth = context.CurrentDepth;
            int targetDepth   = originalDepth + 1;

            while (context.Read())
            {
                if (context.TestExpression("GatewayARN", targetDepth))
                {
                    context.Read();
                    response.GatewayARN = StringUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.CurrentDepth <= originalDepth)
                {
                    return;
                }
            }

            return;
        }