/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { GetComponentResponse response = new GetComponentResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("recipe", targetDepth)) { var unmarshaller = MemoryStreamUnmarshaller.Instance; response.Recipe = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("recipeOutputFormat", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.RecipeOutputFormat = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("tags", targetDepth)) { var unmarshaller = new DictionaryUnmarshaller <string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.Instance, StringUnmarshaller.Instance); response.Tags = unmarshaller.Unmarshall(context); continue; } } return(response); }
/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { GetComponentResponse response = new GetComponentResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("component", targetDepth)) { var unmarshaller = ComponentUnmarshaller.Instance; response.Component = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("requestId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.RequestId = unmarshaller.Unmarshall(context); continue; } } return(response); }
/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { GetComponentResponse response = new GetComponentResponse(); var unmarshaller = ComponentUnmarshaller.Instance; response.Component = unmarshaller.Unmarshall(context); return(response); }