public WorkflowTypeDetail Unmarshall(JsonUnmarshallerContext context) { WorkflowTypeDetail workflowTypeDetail = new WorkflowTypeDetail(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; while (context.Read()) { if ((context.IsKey) && (context.CurrentDepth == targetDepth)) { context.Read(); context.Read(); if (context.TestExpression("TypeInfo", targetDepth)) { workflowTypeDetail.TypeInfo = WorkflowTypeInfoUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Configuration", targetDepth)) { workflowTypeDetail.Configuration = WorkflowTypeConfigurationUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth <= originalDepth) { return(workflowTypeDetail); } } return(workflowTypeDetail); }
public WorkflowTypeDetail Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) { return(null); } WorkflowTypeDetail workflowTypeDetail = new WorkflowTypeDetail(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("typeInfo", targetDepth)) { workflowTypeDetail.TypeInfo = WorkflowTypeInfoUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("configuration", targetDepth)) { workflowTypeDetail.Configuration = WorkflowTypeConfigurationUnmarshaller.GetInstance().Unmarshall(context); continue; } } return(workflowTypeDetail); }