public WorkflowExecutionInfos Unmarshall(JsonUnmarshallerContext context)
        {
            context.Read();
            if (context.CurrentTokenType == JsonToken.Null)
            {
                return(null);
            }
            WorkflowExecutionInfos workflowExecutionInfos = new WorkflowExecutionInfos();


            int targetDepth = context.CurrentDepth;

            while (context.ReadAtDepth(targetDepth))
            {
                if (context.TestExpression("executionInfos", targetDepth))
                {
                    var unmarshaller = new ListUnmarshaller <WorkflowExecutionInfo, WorkflowExecutionInfoUnmarshaller>(
                        WorkflowExecutionInfoUnmarshaller.GetInstance());
                    workflowExecutionInfos.ExecutionInfos = unmarshaller.Unmarshall(context);

                    continue;
                }

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

            return(workflowExecutionInfos);
        }
Exemple #2
0
        public WorkflowExecutionDetail Unmarshall(JsonUnmarshallerContext context)
        {
            if (context.CurrentTokenType == JsonToken.Null)
            {
                return(null);
            }

            WorkflowExecutionDetail workflowExecutionDetail = new WorkflowExecutionDetail();



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

            while (context.Read())
            {
                if (context.TestExpression("executionInfo", targetDepth))
                {
                    context.Read();
                    workflowExecutionDetail.ExecutionInfo = WorkflowExecutionInfoUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("executionConfiguration", targetDepth))
                {
                    context.Read();
                    workflowExecutionDetail.ExecutionConfiguration = WorkflowExecutionConfigurationUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("openCounts", targetDepth))
                {
                    context.Read();
                    workflowExecutionDetail.OpenCounts = WorkflowExecutionOpenCountsUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("latestActivityTaskTimestamp", targetDepth))
                {
                    context.Read();
                    workflowExecutionDetail.LatestActivityTaskTimestamp = DateTimeUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("latestExecutionContext", targetDepth))
                {
                    context.Read();
                    workflowExecutionDetail.LatestExecutionContext = StringUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

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


            return(workflowExecutionDetail);
        }
 public static WorkflowExecutionInfoUnmarshaller GetInstance()
 {
     if (instance == null)
     {
         instance = new WorkflowExecutionInfoUnmarshaller();
     }
     return(instance);
 }
Exemple #4
0
        public WorkflowExecutionInfos Unmarshall(JsonUnmarshallerContext context)
        {
            if (context.CurrentTokenType == JsonToken.Null)
            {
                return(null);
            }

            WorkflowExecutionInfos workflowExecutionInfos = new WorkflowExecutionInfos();



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

            while (context.Read())
            {
                if (context.TestExpression("executionInfos", targetDepth))
                {
                    context.Read();
                    workflowExecutionInfos.ExecutionInfos = new List <WorkflowExecutionInfo>();
                    WorkflowExecutionInfoUnmarshaller unmarshaller = WorkflowExecutionInfoUnmarshaller.GetInstance();
                    while (context.Read())
                    {
                        JsonToken token = context.CurrentTokenType;
                        if (token == JsonToken.ArrayStart)
                        {
                            continue;
                        }
                        if (token == JsonToken.ArrayEnd)
                        {
                            break;
                        }
                        workflowExecutionInfos.ExecutionInfos.Add(unmarshaller.Unmarshall(context));
                    }
                    continue;
                }

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

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


            return(workflowExecutionInfos);
        }
Exemple #5
0
        public WorkflowExecutionDetail Unmarshall(JsonUnmarshallerContext context)
        {
            WorkflowExecutionDetail workflowExecutionDetail = new WorkflowExecutionDetail();

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

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

                    if (context.TestExpression("ExecutionInfo", targetDepth))
                    {
                        workflowExecutionDetail.ExecutionInfo = WorkflowExecutionInfoUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }

                    if (context.TestExpression("ExecutionConfiguration", targetDepth))
                    {
                        workflowExecutionDetail.ExecutionConfiguration = WorkflowExecutionConfigurationUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }

                    if (context.TestExpression("OpenCounts", targetDepth))
                    {
                        workflowExecutionDetail.OpenCounts = WorkflowExecutionOpenCountsUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }

                    if (context.TestExpression("LatestActivityTaskTimestamp", targetDepth))
                    {
                        workflowExecutionDetail.LatestActivityTaskTimestamp = DateTimeUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }

                    if (context.TestExpression("LatestExecutionContext", targetDepth))
                    {
                        workflowExecutionDetail.LatestExecutionContext = StringUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }
                }
                else if (context.IsEndElement && context.CurrentDepth <= originalDepth)
                {
                    return(workflowExecutionDetail);
                }
            }


            return(workflowExecutionDetail);
        }
        public WorkflowExecutionInfos Unmarshall(JsonUnmarshallerContext context)
        {
            WorkflowExecutionInfos workflowExecutionInfos = new WorkflowExecutionInfos();

            workflowExecutionInfos.ExecutionInfos = 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("ExecutionInfos", targetDepth))
                    {
                        workflowExecutionInfos.ExecutionInfos = new List <WorkflowExecutionInfo>();
                        WorkflowExecutionInfoUnmarshaller unmarshaller = WorkflowExecutionInfoUnmarshaller.GetInstance();
                        while (context.Read())
                        {
                            if ((context.IsArrayElement) && (context.CurrentDepth == targetDepth))
                            {
                                workflowExecutionInfos.ExecutionInfos.Add(unmarshaller.Unmarshall(context));
                            }
                            else if (context.IsEndArray)
                            {
                                break;
                            }
                        }
                        continue;
                    }

                    if (context.TestExpression("NextPageToken", targetDepth))
                    {
                        workflowExecutionInfos.NextPageToken = StringUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }
                }
                else if (context.IsEndElement && context.CurrentDepth <= originalDepth)
                {
                    return(workflowExecutionInfos);
                }
            }


            return(workflowExecutionInfos);
        }