private static void UnmarshallResult(XmlUnmarshallerContext context, GetCallerIdentityResponse 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("Account", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.Account = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Arn", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.Arn = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("UserId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.UserId = unmarshaller.Unmarshall(context);
continue;
}
}
}
return;
}