private static void UnmarshallResult(XmlUnmarshallerContext context, ListTagsForResourceResponse 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("TagList/Tag", targetDepth)) { response.TagList.Add(TagUnmarshaller.GetInstance().Unmarshall(context)); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return; } } return; }
public ListTagsForResourceResult Unmarshall(XmlUnmarshallerContext context) { ListTagsForResourceResult listTagsForResourceResult = new ListTagsForResourceResult(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 2; } while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("TagList/Tag", targetDepth)) { listTagsForResourceResult.TagList.Add(TagUnmarshaller.GetInstance().Unmarshall(context)); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return(listTagsForResourceResult); } } return(listTagsForResourceResult); }