private static void UnmarshallResult(XmlUnmarshallerContext context,GetACLResponse 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("Owner", targetDepth))
{
if (null == response.AccessControlList)
response.AccessControlList = new S3AccessControlList();
response.AccessControlList.Owner = OwnerUnmarshaller.GetInstance().Unmarshall(context);
continue;
}
if (context.TestExpression("Grant", targetDepth + 1))
{
if (null == response.AccessControlList)
response.AccessControlList = new S3AccessControlList();
response.AccessControlList.Grants.Add(GrantUnmarshaller.GetInstance().Unmarshall(context));
continue;
}
}
else if (context.IsEndElement && context.CurrentDepth < originalDepth)
{
return;
}
}
return;
}