public ChildWorkflowExecutionTimedOutEventAttributes Unmarshall(JsonUnmarshallerContext context) { if (context.CurrentTokenType == JsonToken.Null) { return(null); } ChildWorkflowExecutionTimedOutEventAttributes childWorkflowExecutionTimedOutEventAttributes = new ChildWorkflowExecutionTimedOutEventAttributes(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; while (context.Read()) { if (context.TestExpression("workflowExecution", targetDepth)) { context.Read(); childWorkflowExecutionTimedOutEventAttributes.WorkflowExecution = WorkflowExecutionUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("workflowType", targetDepth)) { context.Read(); childWorkflowExecutionTimedOutEventAttributes.WorkflowType = WorkflowTypeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("timeoutType", targetDepth)) { context.Read(); childWorkflowExecutionTimedOutEventAttributes.TimeoutType = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("initiatedEventId", targetDepth)) { context.Read(); childWorkflowExecutionTimedOutEventAttributes.InitiatedEventId = LongUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("startedEventId", targetDepth)) { context.Read(); childWorkflowExecutionTimedOutEventAttributes.StartedEventId = LongUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.CurrentDepth <= originalDepth) { return(childWorkflowExecutionTimedOutEventAttributes); } } return(childWorkflowExecutionTimedOutEventAttributes); }
public WorkflowTypeInfo Unmarshall(JsonUnmarshallerContext context) { if (context.CurrentTokenType == JsonToken.Null) { return(null); } WorkflowTypeInfo workflowTypeInfo = new WorkflowTypeInfo(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; while (context.Read()) { if (context.TestExpression("workflowType", targetDepth)) { context.Read(); workflowTypeInfo.WorkflowType = WorkflowTypeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("status", targetDepth)) { context.Read(); workflowTypeInfo.Status = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("description", targetDepth)) { context.Read(); workflowTypeInfo.Description = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("creationDate", targetDepth)) { context.Read(); workflowTypeInfo.CreationDate = DateTimeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("deprecationDate", targetDepth)) { context.Read(); workflowTypeInfo.DeprecationDate = DateTimeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.CurrentDepth <= originalDepth) { return(workflowTypeInfo); } } return(workflowTypeInfo); }
public ChildWorkflowExecutionFailedEventAttributes Unmarshall(JsonUnmarshallerContext context) { ChildWorkflowExecutionFailedEventAttributes childWorkflowExecutionFailedEventAttributes = new ChildWorkflowExecutionFailedEventAttributes(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; while (context.Read()) { if ((context.IsKey) && (context.CurrentDepth == targetDepth)) { context.Read(); context.Read(); if (context.TestExpression("WorkflowExecution", targetDepth)) { childWorkflowExecutionFailedEventAttributes.WorkflowExecution = WorkflowExecutionUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("WorkflowType", targetDepth)) { childWorkflowExecutionFailedEventAttributes.WorkflowType = WorkflowTypeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Reason", targetDepth)) { childWorkflowExecutionFailedEventAttributes.Reason = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Details", targetDepth)) { childWorkflowExecutionFailedEventAttributes.Details = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("InitiatedEventId", targetDepth)) { childWorkflowExecutionFailedEventAttributes.InitiatedEventId = LongUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("StartedEventId", targetDepth)) { childWorkflowExecutionFailedEventAttributes.StartedEventId = LongUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth <= originalDepth) { return(childWorkflowExecutionFailedEventAttributes); } } return(childWorkflowExecutionFailedEventAttributes); }
public static WorkflowTypeUnmarshaller GetInstance() { if (instance == null) { instance = new WorkflowTypeUnmarshaller(); } return(instance); }
public WorkflowTypeInfo Unmarshall(JsonUnmarshallerContext context) { WorkflowTypeInfo workflowTypeInfo = new WorkflowTypeInfo(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; while (context.Read()) { if ((context.IsKey) && (context.CurrentDepth == targetDepth)) { context.Read(); context.Read(); if (context.TestExpression("WorkflowType", targetDepth)) { workflowTypeInfo.WorkflowType = WorkflowTypeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Status", targetDepth)) { workflowTypeInfo.Status = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Description", targetDepth)) { workflowTypeInfo.Description = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("CreationDate", targetDepth)) { workflowTypeInfo.CreationDate = DateTimeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("DeprecationDate", targetDepth)) { workflowTypeInfo.DeprecationDate = DateTimeUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth <= originalDepth) { return(workflowTypeInfo); } } return(workflowTypeInfo); }
public StartChildWorkflowExecutionFailedEventAttributes Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) { return(null); } StartChildWorkflowExecutionFailedEventAttributes startChildWorkflowExecutionFailedEventAttributes = new StartChildWorkflowExecutionFailedEventAttributes(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("workflowType", targetDepth)) { startChildWorkflowExecutionFailedEventAttributes.WorkflowType = WorkflowTypeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("cause", targetDepth)) { startChildWorkflowExecutionFailedEventAttributes.Cause = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("workflowId", targetDepth)) { startChildWorkflowExecutionFailedEventAttributes.WorkflowId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("initiatedEventId", targetDepth)) { startChildWorkflowExecutionFailedEventAttributes.InitiatedEventId = LongUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("decisionTaskCompletedEventId", targetDepth)) { startChildWorkflowExecutionFailedEventAttributes.DecisionTaskCompletedEventId = LongUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("control", targetDepth)) { startChildWorkflowExecutionFailedEventAttributes.Control = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } } return(startChildWorkflowExecutionFailedEventAttributes); }
public ChildWorkflowExecutionFailedEventAttributes Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) { return(null); } ChildWorkflowExecutionFailedEventAttributes childWorkflowExecutionFailedEventAttributes = new ChildWorkflowExecutionFailedEventAttributes(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("workflowExecution", targetDepth)) { childWorkflowExecutionFailedEventAttributes.WorkflowExecution = WorkflowExecutionUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("workflowType", targetDepth)) { childWorkflowExecutionFailedEventAttributes.WorkflowType = WorkflowTypeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("reason", targetDepth)) { childWorkflowExecutionFailedEventAttributes.Reason = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("details", targetDepth)) { childWorkflowExecutionFailedEventAttributes.Details = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("initiatedEventId", targetDepth)) { childWorkflowExecutionFailedEventAttributes.InitiatedEventId = LongUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("startedEventId", targetDepth)) { childWorkflowExecutionFailedEventAttributes.StartedEventId = LongUnmarshaller.GetInstance().Unmarshall(context); continue; } } return(childWorkflowExecutionFailedEventAttributes); }
public StartChildWorkflowExecutionInitiatedEventAttributes Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) { return(null); } StartChildWorkflowExecutionInitiatedEventAttributes startChildWorkflowExecutionInitiatedEventAttributes = new StartChildWorkflowExecutionInitiatedEventAttributes(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("workflowId", targetDepth)) { startChildWorkflowExecutionInitiatedEventAttributes.WorkflowId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("workflowType", targetDepth)) { startChildWorkflowExecutionInitiatedEventAttributes.WorkflowType = WorkflowTypeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("control", targetDepth)) { startChildWorkflowExecutionInitiatedEventAttributes.Control = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("input", targetDepth)) { startChildWorkflowExecutionInitiatedEventAttributes.Input = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("executionStartToCloseTimeout", targetDepth)) { startChildWorkflowExecutionInitiatedEventAttributes.ExecutionStartToCloseTimeout = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("taskList", targetDepth)) { startChildWorkflowExecutionInitiatedEventAttributes.TaskList = TaskListUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("decisionTaskCompletedEventId", targetDepth)) { startChildWorkflowExecutionInitiatedEventAttributes.DecisionTaskCompletedEventId = LongUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("childPolicy", targetDepth)) { startChildWorkflowExecutionInitiatedEventAttributes.ChildPolicy = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("taskStartToCloseTimeout", targetDepth)) { startChildWorkflowExecutionInitiatedEventAttributes.TaskStartToCloseTimeout = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("tagList", targetDepth)) { var unmarshaller = new ListUnmarshaller <String, StringUnmarshaller>( StringUnmarshaller.GetInstance()); startChildWorkflowExecutionInitiatedEventAttributes.TagList = unmarshaller.Unmarshall(context); continue; } } return(startChildWorkflowExecutionInitiatedEventAttributes); }
public WorkflowExecutionContinuedAsNewEventAttributes Unmarshall(JsonUnmarshallerContext context) { if (context.CurrentTokenType == JsonToken.Null) { return(null); } WorkflowExecutionContinuedAsNewEventAttributes workflowExecutionContinuedAsNewEventAttributes = new WorkflowExecutionContinuedAsNewEventAttributes(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; while (context.Read()) { if (context.TestExpression("input", targetDepth)) { context.Read(); workflowExecutionContinuedAsNewEventAttributes.Input = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("decisionTaskCompletedEventId", targetDepth)) { context.Read(); workflowExecutionContinuedAsNewEventAttributes.DecisionTaskCompletedEventId = LongUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("newExecutionRunId", targetDepth)) { context.Read(); workflowExecutionContinuedAsNewEventAttributes.NewExecutionRunId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("executionStartToCloseTimeout", targetDepth)) { context.Read(); workflowExecutionContinuedAsNewEventAttributes.ExecutionStartToCloseTimeout = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("taskList", targetDepth)) { context.Read(); workflowExecutionContinuedAsNewEventAttributes.TaskList = TaskListUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("taskStartToCloseTimeout", targetDepth)) { context.Read(); workflowExecutionContinuedAsNewEventAttributes.TaskStartToCloseTimeout = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("childPolicy", targetDepth)) { context.Read(); workflowExecutionContinuedAsNewEventAttributes.ChildPolicy = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("tagList", targetDepth)) { context.Read(); workflowExecutionContinuedAsNewEventAttributes.TagList = new List <String>(); StringUnmarshaller unmarshaller = StringUnmarshaller.GetInstance(); while (context.Read()) { JsonToken token = context.CurrentTokenType; if (token == JsonToken.ArrayStart) { continue; } if (token == JsonToken.ArrayEnd) { break; } workflowExecutionContinuedAsNewEventAttributes.TagList.Add(unmarshaller.Unmarshall(context)); } continue; } if (context.TestExpression("workflowType", targetDepth)) { context.Read(); workflowExecutionContinuedAsNewEventAttributes.WorkflowType = WorkflowTypeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.CurrentDepth <= originalDepth) { return(workflowExecutionContinuedAsNewEventAttributes); } } return(workflowExecutionContinuedAsNewEventAttributes); }
public StartChildWorkflowExecutionFailedEventAttributes Unmarshall(JsonUnmarshallerContext context) { StartChildWorkflowExecutionFailedEventAttributes startChildWorkflowExecutionFailedEventAttributes = new StartChildWorkflowExecutionFailedEventAttributes(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; while (context.Read()) { if ((context.IsKey) && (context.CurrentDepth == targetDepth)) { context.Read(); context.Read(); if (context.TestExpression("WorkflowType", targetDepth)) { startChildWorkflowExecutionFailedEventAttributes.WorkflowType = WorkflowTypeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Cause", targetDepth)) { startChildWorkflowExecutionFailedEventAttributes.Cause = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("WorkflowId", targetDepth)) { startChildWorkflowExecutionFailedEventAttributes.WorkflowId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("InitiatedEventId", targetDepth)) { startChildWorkflowExecutionFailedEventAttributes.InitiatedEventId = LongUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("DecisionTaskCompletedEventId", targetDepth)) { startChildWorkflowExecutionFailedEventAttributes.DecisionTaskCompletedEventId = LongUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Control", targetDepth)) { startChildWorkflowExecutionFailedEventAttributes.Control = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth <= originalDepth) { return(startChildWorkflowExecutionFailedEventAttributes); } } return(startChildWorkflowExecutionFailedEventAttributes); }
public DecisionTask Unmarshall(JsonUnmarshallerContext context) { DecisionTask decisionTask = new DecisionTask(); decisionTask.Events = 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("TaskToken", targetDepth)) { decisionTask.TaskToken = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("StartedEventId", targetDepth)) { decisionTask.StartedEventId = LongUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("WorkflowExecution", targetDepth)) { decisionTask.WorkflowExecution = WorkflowExecutionUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("WorkflowType", targetDepth)) { decisionTask.WorkflowType = WorkflowTypeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Events", targetDepth)) { decisionTask.Events = new List <HistoryEvent>(); HistoryEventUnmarshaller unmarshaller = HistoryEventUnmarshaller.GetInstance(); while (context.Read()) { if ((context.IsArrayElement) && (context.CurrentDepth == targetDepth)) { decisionTask.Events.Add(unmarshaller.Unmarshall(context)); } else if (context.IsEndArray) { break; } } continue; } if (context.TestExpression("NextPageToken", targetDepth)) { decisionTask.NextPageToken = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("PreviousStartedEventId", targetDepth)) { decisionTask.PreviousStartedEventId = LongUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth <= originalDepth) { return(decisionTask); } } return(decisionTask); }
public DecisionTask Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) { return(null); } DecisionTask decisionTask = new DecisionTask(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("taskToken", targetDepth)) { decisionTask.TaskToken = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("startedEventId", targetDepth)) { decisionTask.StartedEventId = LongUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("workflowExecution", targetDepth)) { decisionTask.WorkflowExecution = WorkflowExecutionUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("workflowType", targetDepth)) { decisionTask.WorkflowType = WorkflowTypeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("events", targetDepth)) { var unmarshaller = new ListUnmarshaller <HistoryEvent, HistoryEventUnmarshaller>( HistoryEventUnmarshaller.GetInstance()); decisionTask.Events = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("nextPageToken", targetDepth)) { decisionTask.NextPageToken = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("previousStartedEventId", targetDepth)) { decisionTask.PreviousStartedEventId = LongUnmarshaller.GetInstance().Unmarshall(context); continue; } } return(decisionTask); }
public WorkflowExecutionInfo Unmarshall(JsonUnmarshallerContext context) { WorkflowExecutionInfo workflowExecutionInfo = new WorkflowExecutionInfo(); workflowExecutionInfo.TagList = 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("Execution", targetDepth)) { workflowExecutionInfo.Execution = WorkflowExecutionUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("WorkflowType", targetDepth)) { workflowExecutionInfo.WorkflowType = WorkflowTypeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("StartTimestamp", targetDepth)) { workflowExecutionInfo.StartTimestamp = DateTimeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("CloseTimestamp", targetDepth)) { workflowExecutionInfo.CloseTimestamp = DateTimeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ExecutionStatus", targetDepth)) { workflowExecutionInfo.ExecutionStatus = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("CloseStatus", targetDepth)) { workflowExecutionInfo.CloseStatus = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Parent", targetDepth)) { workflowExecutionInfo.Parent = WorkflowExecutionUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("TagList", targetDepth)) { workflowExecutionInfo.TagList = new List <String>(); StringUnmarshaller unmarshaller = StringUnmarshaller.GetInstance(); while (context.Read()) { if ((context.IsArrayElement) && (context.CurrentDepth == targetDepth)) { workflowExecutionInfo.TagList.Add(unmarshaller.Unmarshall(context)); } else if (context.IsEndArray) { break; } } continue; } if (context.TestExpression("CancelRequested", targetDepth)) { workflowExecutionInfo.CancelRequested = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth <= originalDepth) { return(workflowExecutionInfo); } } return(workflowExecutionInfo); }
public StartChildWorkflowExecutionInitiatedEventAttributes Unmarshall(JsonUnmarshallerContext context) { StartChildWorkflowExecutionInitiatedEventAttributes startChildWorkflowExecutionInitiatedEventAttributes = new StartChildWorkflowExecutionInitiatedEventAttributes(); startChildWorkflowExecutionInitiatedEventAttributes.TagList = 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("WorkflowId", targetDepth)) { startChildWorkflowExecutionInitiatedEventAttributes.WorkflowId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("WorkflowType", targetDepth)) { startChildWorkflowExecutionInitiatedEventAttributes.WorkflowType = WorkflowTypeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Control", targetDepth)) { startChildWorkflowExecutionInitiatedEventAttributes.Control = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Input", targetDepth)) { startChildWorkflowExecutionInitiatedEventAttributes.Input = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ExecutionStartToCloseTimeout", targetDepth)) { startChildWorkflowExecutionInitiatedEventAttributes.ExecutionStartToCloseTimeout = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("TaskList", targetDepth)) { startChildWorkflowExecutionInitiatedEventAttributes.TaskList = TaskListUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("DecisionTaskCompletedEventId", targetDepth)) { startChildWorkflowExecutionInitiatedEventAttributes.DecisionTaskCompletedEventId = LongUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ChildPolicy", targetDepth)) { startChildWorkflowExecutionInitiatedEventAttributes.ChildPolicy = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("TaskStartToCloseTimeout", targetDepth)) { startChildWorkflowExecutionInitiatedEventAttributes.TaskStartToCloseTimeout = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("TagList", targetDepth)) { startChildWorkflowExecutionInitiatedEventAttributes.TagList = new List <String>(); StringUnmarshaller unmarshaller = StringUnmarshaller.GetInstance(); while (context.Read()) { if ((context.IsArrayElement) && (context.CurrentDepth == targetDepth)) { startChildWorkflowExecutionInitiatedEventAttributes.TagList.Add(unmarshaller.Unmarshall(context)); } else if (context.IsEndArray) { break; } } continue; } } else if (context.IsEndElement && context.CurrentDepth <= originalDepth) { return(startChildWorkflowExecutionInitiatedEventAttributes); } } return(startChildWorkflowExecutionInitiatedEventAttributes); }
public WorkflowExecutionInfo Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) { return(null); } WorkflowExecutionInfo workflowExecutionInfo = new WorkflowExecutionInfo(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("execution", targetDepth)) { workflowExecutionInfo.Execution = WorkflowExecutionUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("workflowType", targetDepth)) { workflowExecutionInfo.WorkflowType = WorkflowTypeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("startTimestamp", targetDepth)) { workflowExecutionInfo.StartTimestamp = DateTimeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("closeTimestamp", targetDepth)) { workflowExecutionInfo.CloseTimestamp = DateTimeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("executionStatus", targetDepth)) { workflowExecutionInfo.ExecutionStatus = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("closeStatus", targetDepth)) { workflowExecutionInfo.CloseStatus = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("parent", targetDepth)) { workflowExecutionInfo.Parent = WorkflowExecutionUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("tagList", targetDepth)) { var unmarshaller = new ListUnmarshaller <String, StringUnmarshaller>( StringUnmarshaller.GetInstance()); workflowExecutionInfo.TagList = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("cancelRequested", targetDepth)) { workflowExecutionInfo.CancelRequested = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } } return(workflowExecutionInfo); }
public DecisionTask Unmarshall(JsonUnmarshallerContext context) { if (context.CurrentTokenType == JsonToken.Null) { return(null); } DecisionTask decisionTask = new DecisionTask(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; while (context.Read()) { if (context.TestExpression("taskToken", targetDepth)) { context.Read(); decisionTask.TaskToken = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("startedEventId", targetDepth)) { context.Read(); decisionTask.StartedEventId = LongUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("workflowExecution", targetDepth)) { context.Read(); decisionTask.WorkflowExecution = WorkflowExecutionUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("workflowType", targetDepth)) { context.Read(); decisionTask.WorkflowType = WorkflowTypeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("events", targetDepth)) { context.Read(); decisionTask.Events = new List <HistoryEvent>(); HistoryEventUnmarshaller unmarshaller = HistoryEventUnmarshaller.GetInstance(); while (context.Read()) { JsonToken token = context.CurrentTokenType; if (token == JsonToken.ArrayStart) { continue; } if (token == JsonToken.ArrayEnd) { break; } decisionTask.Events.Add(unmarshaller.Unmarshall(context)); } continue; } if (context.TestExpression("nextPageToken", targetDepth)) { context.Read(); decisionTask.NextPageToken = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("previousStartedEventId", targetDepth)) { context.Read(); decisionTask.PreviousStartedEventId = LongUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.CurrentDepth <= originalDepth) { return(decisionTask); } } return(decisionTask); }
public WorkflowExecutionInfo Unmarshall(JsonUnmarshallerContext context) { if (context.CurrentTokenType == JsonToken.Null) { return(null); } WorkflowExecutionInfo workflowExecutionInfo = new WorkflowExecutionInfo(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; while (context.Read()) { if (context.TestExpression("execution", targetDepth)) { context.Read(); workflowExecutionInfo.Execution = WorkflowExecutionUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("workflowType", targetDepth)) { context.Read(); workflowExecutionInfo.WorkflowType = WorkflowTypeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("startTimestamp", targetDepth)) { context.Read(); workflowExecutionInfo.StartTimestamp = DateTimeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("closeTimestamp", targetDepth)) { context.Read(); workflowExecutionInfo.CloseTimestamp = DateTimeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("executionStatus", targetDepth)) { context.Read(); workflowExecutionInfo.ExecutionStatus = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("closeStatus", targetDepth)) { context.Read(); workflowExecutionInfo.CloseStatus = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("parent", targetDepth)) { context.Read(); workflowExecutionInfo.Parent = WorkflowExecutionUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("tagList", targetDepth)) { context.Read(); workflowExecutionInfo.TagList = new List <String>(); StringUnmarshaller unmarshaller = StringUnmarshaller.GetInstance(); while (context.Read()) { JsonToken token = context.CurrentTokenType; if (token == JsonToken.ArrayStart) { continue; } if (token == JsonToken.ArrayEnd) { break; } workflowExecutionInfo.TagList.Add(unmarshaller.Unmarshall(context)); } continue; } if (context.TestExpression("cancelRequested", targetDepth)) { context.Read(); workflowExecutionInfo.CancelRequested = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.CurrentDepth <= originalDepth) { return(workflowExecutionInfo); } } return(workflowExecutionInfo); }