Esempio n. 1
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);
        }
Esempio n. 2
0
 public static WorkflowExecutionConfigurationUnmarshaller GetInstance()
 {
     if (instance == null)
     {
         instance = new WorkflowExecutionConfigurationUnmarshaller();
     }
     return(instance);
 }
Esempio n. 3
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);
        }