コード例 #1
0
        public UpdatePipelineNotificationsResult Unmarshall(JsonUnmarshallerContext context)
        {
            UpdatePipelineNotificationsResult updatePipelineNotificationsResult = new UpdatePipelineNotificationsResult();

            int originalDepth = context.CurrentDepth;
            int targetDepth   = originalDepth + 1;

            while (context.Read())
            {
                if ((context.IsKey) && (context.CurrentDepth == targetDepth))
                {
                    context.Read();
                    context.Read();

                    if (context.TestExpression("Pipeline", targetDepth))
                    {
                        updatePipelineNotificationsResult.Pipeline = PipelineUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }
                }
                else if (context.IsEndElement && context.CurrentDepth <= originalDepth)
                {
                    return(updatePipelineNotificationsResult);
                }
            }


            return(updatePipelineNotificationsResult);
        }
コード例 #2
0
        public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
        {
            ListPipelinesResponse response = new ListPipelinesResponse();

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

            while (context.ReadAtDepth(targetDepth))
            {
                if (context.TestExpression("Pipelines", targetDepth))
                {
                    var unmarshaller = new ListUnmarshaller <Pipeline, PipelineUnmarshaller>(
                        PipelineUnmarshaller.GetInstance());
                    response.Pipelines = unmarshaller.Unmarshall(context);

                    continue;
                }

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

            return(response);
        }
コード例 #3
0
        public ReadPipelineResult Unmarshall(JsonUnmarshallerContext context)
        {
            if (context.CurrentTokenType == JsonUnmarshallerContext.TokenType.Null)
            {
                return(null);
            }
            ReadPipelineResult readPipelineResult = new ReadPipelineResult();

            int originalDepth = context.CurrentDepth;
            int targetDepth   = originalDepth + 1;

            while (context.Read())
            {
                if ((context.IsKey) && (context.CurrentDepth == targetDepth))
                {
                    context.Read();
                    context.Read();

                    if (context.TestExpression("Pipeline", targetDepth))
                    {
                        readPipelineResult.Pipeline = PipelineUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }
                }
                else if (context.IsEndElement && context.CurrentDepth <= originalDepth)
                {
                    return(readPipelineResult);
                }
            }


            return(readPipelineResult);
        }
コード例 #4
0
        private static void UnmarshallResult(JsonUnmarshallerContext context, ListPipelinesResponse response)
        {
            int originalDepth = context.CurrentDepth;
            int targetDepth   = originalDepth + 1;

            while (context.Read())
            {
                if (context.TestExpression("Pipelines", targetDepth))
                {
                    context.Read();

                    if (context.CurrentTokenType == JsonToken.Null)
                    {
                        response.Pipelines = null;
                        continue;
                    }
                    response.Pipelines = new List <Pipeline>();
                    PipelineUnmarshaller unmarshaller = PipelineUnmarshaller.GetInstance();
                    while (context.Read())
                    {
                        JsonToken token = context.CurrentTokenType;
                        if (token == JsonToken.ArrayStart)
                        {
                            continue;
                        }
                        if (token == JsonToken.ArrayEnd)
                        {
                            break;
                        }
                        response.Pipelines.Add(unmarshaller.Unmarshall(context));
                    }
                    continue;
                }

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

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

            return;
        }
コード例 #5
0
        public ListPipelinesResult Unmarshall(JsonUnmarshallerContext context)
        {
            if (context.CurrentTokenType == JsonUnmarshallerContext.TokenType.Null)
            {
                return(null);
            }
            ListPipelinesResult listPipelinesResult = new ListPipelinesResult();

            listPipelinesResult.Pipelines = null;

            int originalDepth = context.CurrentDepth;
            int targetDepth   = originalDepth + 1;

            while (context.Read())
            {
                if ((context.IsKey) && (context.CurrentDepth == targetDepth))
                {
                    context.Read();
                    context.Read();

                    if (context.TestExpression("Pipelines", targetDepth))
                    {
                        listPipelinesResult.Pipelines = new List <Pipeline>();
                        PipelineUnmarshaller unmarshaller = PipelineUnmarshaller.GetInstance();
                        while (context.Read())
                        {
                            if ((context.IsArrayElement) && (context.CurrentDepth == targetDepth))
                            {
                                listPipelinesResult.Pipelines.Add(unmarshaller.Unmarshall(context));
                            }
                            else if (context.IsEndArray)
                            {
                                break;
                            }
                        }
                        continue;
                    }
                }
                else if (context.IsEndElement && context.CurrentDepth <= originalDepth)
                {
                    return(listPipelinesResult);
                }
            }


            return(listPipelinesResult);
        }
コード例 #6
0
        public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
        {
            UpdatePipelineStatusResponse response = new UpdatePipelineStatusResponse();

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

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

            return(response);
        }
コード例 #7
0
        private static void UnmarshallResult(JsonUnmarshallerContext context, ReadPipelineResponse response)
        {
            int originalDepth = context.CurrentDepth;
            int targetDepth   = originalDepth + 1;

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

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

            return;
        }