public void TestListSystemMetaSearchKeys() { ListSystemMetaSearchKeysRequest request = new ListSystemMetaSearchKeysRequest(); ListSystemMetaSearchKeysResponse response = client.ListSystemMetaSearchKeys(request); Assert.IsNotNull(response); CompareKeyResults(response.MetaDataSearchList.IndexableKeys, indexableSystemKeys); CompareKeyResults(response.MetaDataSearchList.OptionalAttributes, optionalSystemKeys); }
public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { ListSystemMetaSearchKeysResponse response = new ListSystemMetaSearchKeysResponse(); while (context.Read()) { if (context.IsStartElement) { UnmarshallResult(context, response); continue; } } return(response); }
private static void UnmarshallResult(XmlUnmarshallerContext context, ListSystemMetaSearchKeysResponse 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("IndexableKeys/Key", targetDepth)) { response.MetaDataSearchList.IndexableKeys.Add(MetaSearchKeyUnmarshaller.Instance.Unmarshall(context)); continue; } if (context.TestExpression("OptionalAttributes/Attribute", targetDepth)) { response.MetaDataSearchList.OptionalAttributes.Add(MetaSearchKeyUnmarshaller.Instance.Unmarshall(context)); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return; } } return; }