Beispiel #1
0
        public static SecurityGroupUnmarshaller GetInstance()
        {
            if (instance == null)
            {
                instance = new SecurityGroupUnmarshaller();
            }

            return(instance);
        }
        public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context)
        {
            DescribeSecurityGroupsResponse response = new DescribeSecurityGroupsResponse();

            int targetDepth = 2;

            while (context.Read())
            {
                if (context.IsStartElement || context.IsAttribute)
                {
                    if (context.TestExpression("securityGroupInfo/item", targetDepth))
                    {
                        response.SecurityGroups.Add(SecurityGroupUnmarshaller.GetInstance().Unmarshall(context));

                        continue;
                    }
                }
            }


            return(response);
        }