/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { UpdateRecordsResponse response = new UpdateRecordsResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("Records", targetDepth)) { var unmarshaller = new ListUnmarshaller<Record, RecordUnmarshaller>(RecordUnmarshaller.Instance); response.Records = unmarshaller.Unmarshall(context); continue; } } return response; }
private static List<Record> ExtractRecords(UpdateRecordsResponse response) { List<Record> updatedRecords = new List<Record>(); foreach (Amazon.CognitoSync.Model.Record remoteRecord in response.Records) { updatedRecords.Add(ModelToRecord(remoteRecord)); } return updatedRecords; }