Ejemplo n.º 1
0
        public ActivityTypeInfo Unmarshall(JsonUnmarshallerContext context)
        {
            if (context.CurrentTokenType == JsonToken.Null)
            {
                return(null);
            }

            ActivityTypeInfo activityTypeInfo = new ActivityTypeInfo();



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

            while (context.Read())
            {
                if (context.TestExpression("activityType", targetDepth))
                {
                    context.Read();
                    activityTypeInfo.ActivityType = ActivityTypeUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("status", targetDepth))
                {
                    context.Read();
                    activityTypeInfo.Status = StringUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("description", targetDepth))
                {
                    context.Read();
                    activityTypeInfo.Description = StringUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("creationDate", targetDepth))
                {
                    context.Read();
                    activityTypeInfo.CreationDate = DateTimeUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("deprecationDate", targetDepth))
                {
                    context.Read();
                    activityTypeInfo.DeprecationDate = DateTimeUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

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


            return(activityTypeInfo);
        }
Ejemplo n.º 2
0
        public ActivityTask Unmarshall(JsonUnmarshallerContext context)
        {
            ActivityTask activityTask = new ActivityTask();

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

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

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

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

                    if (context.TestExpression("StartedEventId", targetDepth))
                    {
                        activityTask.StartedEventId = LongUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }

                    if (context.TestExpression("WorkflowExecution", targetDepth))
                    {
                        activityTask.WorkflowExecution = WorkflowExecutionUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }

                    if (context.TestExpression("ActivityType", targetDepth))
                    {
                        activityTask.ActivityType = ActivityTypeUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }

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


            return(activityTask);
        }
 public static ActivityTypeUnmarshaller GetInstance()
 {
     if (instance == null)
     {
         instance = new ActivityTypeUnmarshaller();
     }
     return(instance);
 }
Ejemplo n.º 4
0
        public ScheduleActivityTaskFailedEventAttributes Unmarshall(JsonUnmarshallerContext context)
        {
            if (context.CurrentTokenType == JsonToken.Null)
            {
                return(null);
            }

            ScheduleActivityTaskFailedEventAttributes scheduleActivityTaskFailedEventAttributes = new ScheduleActivityTaskFailedEventAttributes();



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

            while (context.Read())
            {
                if (context.TestExpression("activityType", targetDepth))
                {
                    context.Read();
                    scheduleActivityTaskFailedEventAttributes.ActivityType = ActivityTypeUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("activityId", targetDepth))
                {
                    context.Read();
                    scheduleActivityTaskFailedEventAttributes.ActivityId = StringUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("cause", targetDepth))
                {
                    context.Read();
                    scheduleActivityTaskFailedEventAttributes.Cause = StringUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("decisionTaskCompletedEventId", targetDepth))
                {
                    context.Read();
                    scheduleActivityTaskFailedEventAttributes.DecisionTaskCompletedEventId = LongUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

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


            return(scheduleActivityTaskFailedEventAttributes);
        }
Ejemplo n.º 5
0
        public ActivityTask Unmarshall(JsonUnmarshallerContext context)
        {
            context.Read();
            if (context.CurrentTokenType == JsonToken.Null)
            {
                return(null);
            }
            ActivityTask activityTask = new ActivityTask();


            int targetDepth = context.CurrentDepth;

            while (context.ReadAtDepth(targetDepth))
            {
                if (context.TestExpression("taskToken", targetDepth))
                {
                    activityTask.TaskToken = StringUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("activityId", targetDepth))
                {
                    activityTask.ActivityId = StringUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("startedEventId", targetDepth))
                {
                    activityTask.StartedEventId = LongUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("workflowExecution", targetDepth))
                {
                    activityTask.WorkflowExecution = WorkflowExecutionUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("activityType", targetDepth))
                {
                    activityTask.ActivityType = ActivityTypeUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("input", targetDepth))
                {
                    activityTask.Input = StringUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }
            }

            return(activityTask);
        }
        public ActivityTypeInfo Unmarshall(JsonUnmarshallerContext context)
        {
            ActivityTypeInfo activityTypeInfo = new ActivityTypeInfo();

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

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

                    if (context.TestExpression("ActivityType", targetDepth))
                    {
                        activityTypeInfo.ActivityType = ActivityTypeUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }

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

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

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

                    if (context.TestExpression("DeprecationDate", targetDepth))
                    {
                        activityTypeInfo.DeprecationDate = DateTimeUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }
                }
                else if (context.IsEndElement && context.CurrentDepth <= originalDepth)
                {
                    return(activityTypeInfo);
                }
            }


            return(activityTypeInfo);
        }
        public ScheduleActivityTaskFailedEventAttributes Unmarshall(JsonUnmarshallerContext context)
        {
            ScheduleActivityTaskFailedEventAttributes scheduleActivityTaskFailedEventAttributes = new ScheduleActivityTaskFailedEventAttributes();

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

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

                    if (context.TestExpression("ActivityType", targetDepth))
                    {
                        scheduleActivityTaskFailedEventAttributes.ActivityType = ActivityTypeUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }

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

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

                    if (context.TestExpression("DecisionTaskCompletedEventId", targetDepth))
                    {
                        scheduleActivityTaskFailedEventAttributes.DecisionTaskCompletedEventId = LongUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }
                }
                else if (context.IsEndElement && context.CurrentDepth <= originalDepth)
                {
                    return(scheduleActivityTaskFailedEventAttributes);
                }
            }


            return(scheduleActivityTaskFailedEventAttributes);
        }
        public ActivityTaskScheduledEventAttributes Unmarshall(JsonUnmarshallerContext context)
        {
            ActivityTaskScheduledEventAttributes activityTaskScheduledEventAttributes = new ActivityTaskScheduledEventAttributes();

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

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

                    if (context.TestExpression("ActivityType", targetDepth))
                    {
                        activityTaskScheduledEventAttributes.ActivityType = ActivityTypeUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }

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

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

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

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

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

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

                    if (context.TestExpression("TaskList", targetDepth))
                    {
                        activityTaskScheduledEventAttributes.TaskList = TaskListUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }

                    if (context.TestExpression("DecisionTaskCompletedEventId", targetDepth))
                    {
                        activityTaskScheduledEventAttributes.DecisionTaskCompletedEventId = LongUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }

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


            return(activityTaskScheduledEventAttributes);
        }
Ejemplo n.º 9
0
        public ActivityTaskScheduledEventAttributes Unmarshall(JsonUnmarshallerContext context)
        {
            context.Read();
            if (context.CurrentTokenType == JsonToken.Null)
            {
                return(null);
            }
            ActivityTaskScheduledEventAttributes activityTaskScheduledEventAttributes = new ActivityTaskScheduledEventAttributes();


            int targetDepth = context.CurrentDepth;

            while (context.ReadAtDepth(targetDepth))
            {
                if (context.TestExpression("activityType", targetDepth))
                {
                    activityTaskScheduledEventAttributes.ActivityType = ActivityTypeUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("activityId", targetDepth))
                {
                    activityTaskScheduledEventAttributes.ActivityId = StringUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("input", targetDepth))
                {
                    activityTaskScheduledEventAttributes.Input = StringUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("control", targetDepth))
                {
                    activityTaskScheduledEventAttributes.Control = StringUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("scheduleToStartTimeout", targetDepth))
                {
                    activityTaskScheduledEventAttributes.ScheduleToStartTimeout = StringUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("scheduleToCloseTimeout", targetDepth))
                {
                    activityTaskScheduledEventAttributes.ScheduleToCloseTimeout = StringUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("startToCloseTimeout", targetDepth))
                {
                    activityTaskScheduledEventAttributes.StartToCloseTimeout = StringUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("taskList", targetDepth))
                {
                    activityTaskScheduledEventAttributes.TaskList = TaskListUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("decisionTaskCompletedEventId", targetDepth))
                {
                    activityTaskScheduledEventAttributes.DecisionTaskCompletedEventId = LongUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("heartbeatTimeout", targetDepth))
                {
                    activityTaskScheduledEventAttributes.HeartbeatTimeout = StringUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }
            }

            return(activityTaskScheduledEventAttributes);
        }