private static void UnmarshallResult(XmlUnmarshallerContext context, GetSendStatisticsResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 2; } while (context.ReadAtDepth(originalDepth)) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("SendDataPoints/member", targetDepth)) { var unmarshaller = SendDataPointUnmarshaller.Instance; var item = unmarshaller.Unmarshall(context); response.SendDataPoints.Add(item); continue; } } } return; }
/// <summary> /// <para>Returns the user's sending statistics. The result is a list of /// data points, representing the last two weeks of sending /// activity.</para> <para>Each data point in the list contains statistics /// for a 15-minute interval.</para> /// </summary> /// /// <param name="getSendStatisticsRequest">Container for the necessary /// parameters to execute the GetSendStatistics service method on /// AmazonSimpleEmailService.</param> /// /// <returns>The response from the GetSendStatistics service method, as /// returned by AmazonSimpleEmailService.</returns> /// public GetSendStatisticsResponse GetSendStatistics(GetSendStatisticsRequest getSendStatisticsRequest) { IRequest <GetSendStatisticsRequest> request = new GetSendStatisticsRequestMarshaller().Marshall(getSendStatisticsRequest); GetSendStatisticsResponse response = Invoke <GetSendStatisticsRequest, GetSendStatisticsResponse> (request, this.signer, GetSendStatisticsResponseUnmarshaller.GetInstance()); return(response); }
public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { GetSendStatisticsResponse response = new GetSendStatisticsResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.IsStartElement) { if (context.TestExpression("GetSendStatisticsResult", 2)) { UnmarshallResult(context, response); continue; } if (context.TestExpression("ResponseMetadata", 2)) { response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context); } } } return(response); }
private static void UnmarshallResult(XmlUnmarshallerContext context, GetSendStatisticsResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 2; } while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("SendDataPoints/member", targetDepth)) { response.SendDataPoints.Add(SendDataPointUnmarshaller.GetInstance().Unmarshall(context)); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return; } } return; }
public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { GetSendStatisticsResponse response = new GetSendStatisticsResponse(); while (context.Read()) { if (context.IsStartElement) { if (context.TestExpression("GetSendStatisticsResult", 2)) { response.GetSendStatisticsResult = GetSendStatisticsResultUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ResponseMetadata", 2)) { response.ResponseMetadata = ResponseMetadataUnmarshaller.GetInstance().Unmarshall(context); } } } return(response); }