public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { ListPipelinesResponse response = new ListPipelinesResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("hasMoreResults", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; response.HasMoreResults = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("marker", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Marker = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("pipelineIdList", targetDepth)) { var unmarshaller = new ListUnmarshaller<PipelineIdName, PipelineIdNameUnmarshaller>(PipelineIdNameUnmarshaller.Instance); response.PipelineIdList = unmarshaller.Unmarshall(context); continue; } } return response; }
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { ListPipelinesResponse response = new ListPipelinesResponse(); context.Read(); UnmarshallResult(context,response); return response; }
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { ListPipelinesResponse response = new ListPipelinesResponse(); context.Read(); response.ListPipelinesResult = ListPipelinesResultUnmarshaller.GetInstance().Unmarshall(context); return response; }
private static void UnmarshallResult(JsonUnmarshallerContext context,ListPipelinesResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; while (context.Read()) { if (context.TestExpression("pipelineIdList", targetDepth)) { context.Read(); response.PipelineIdList = new List<PipelineIdName>(); PipelineIdNameUnmarshaller unmarshaller = PipelineIdNameUnmarshaller.GetInstance(); while (context.Read()) { JsonToken token = context.CurrentTokenType; if (token == JsonToken.ArrayStart) { continue; } if (token == JsonToken.ArrayEnd) { break; } response.PipelineIdList.Add(unmarshaller.Unmarshall(context)); } continue; } if (context.TestExpression("marker", targetDepth)) { context.Read(); response.Marker = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("hasMoreResults", targetDepth)) { context.Read(); response.HasMoreResults = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.CurrentDepth <= originalDepth) { return; } } return; }