private static void UnmarshallResult(XmlUnmarshallerContext context, DeleteMessageBatchResponse 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("BatchResultErrorEntry", targetDepth)) { var unmarshaller = BatchResultErrorEntryUnmarshaller.GetInstance(); var item = unmarshaller.Unmarshall(context); response.Failed.Add(item); continue; } if (context.TestExpression("DeleteMessageBatchResultEntry", targetDepth)) { var unmarshaller = DeleteMessageBatchResultEntryUnmarshaller.GetInstance(); var item = unmarshaller.Unmarshall(context); response.Successful.Add(item); continue; } } } return; }
public static DeleteMessageBatchResultEntryUnmarshaller GetInstance() { if (instance == null) { instance = new DeleteMessageBatchResultEntryUnmarshaller(); } return(instance); }