private static void UnmarshallResult(XmlUnmarshallerContext context, ChangeMessageVisibilityBatchResponse 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("ChangeMessageVisibilityBatchResultEntry", targetDepth))
                    {
                        var unmarshaller = ChangeMessageVisibilityBatchResultEntryUnmarshaller.GetInstance();
                        var item         = unmarshaller.Unmarshall(context);
                        response.Successful.Add(item);
                        continue;
                    }
                }
            }

            return;
        }
 public static ChangeMessageVisibilityBatchResultEntryUnmarshaller GetInstance()
 {
     if (instance == null)
     {
         instance = new ChangeMessageVisibilityBatchResultEntryUnmarshaller();
     }
     return(instance);
 }