public CreateClusterSecurityGroupResult Unmarshall(XmlUnmarshallerContext context)
        {
            CreateClusterSecurityGroupResult result = new CreateClusterSecurityGroupResult();

            int originalDepth = context.CurrentDepth;
            int targetDepth   = originalDepth + 1;

            if (context.IsStartOfDocument)
            {
                targetDepth += 2;
            }

            while (context.Read())
            {
                if (context.IsStartElement || context.IsAttribute)
                {
                    if (context.TestExpression("ClusterSecurityGroup", targetDepth))
                    {
                        result.ClusterSecurityGroup = ClusterSecurityGroupUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }
                }
                else if (context.IsEndElement && context.CurrentDepth < originalDepth)
                {
                    return(result);
                }
            }



            return(result);
        }
        private static void UnmarshallResult(XmlUnmarshallerContext context, CreateClusterSecurityGroupResponse 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("ClusterSecurityGroup", targetDepth))
                    {
                        response.ClusterSecurityGroup = ClusterSecurityGroupUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }
                }
                else if (context.IsEndElement && context.CurrentDepth < originalDepth)
                {
                    return;
                }
            }
        }
        public static ClusterSecurityGroupUnmarshaller GetInstance()
        {
            if (instance == null)
            {
                instance = new ClusterSecurityGroupUnmarshaller();
            }

            return(instance);
        }
        public DescribeClusterSecurityGroupsResult Unmarshall(XmlUnmarshallerContext context)
        {
            DescribeClusterSecurityGroupsResult describeClusterSecurityGroupsResult = new DescribeClusterSecurityGroupsResult();
            int originalDepth = context.CurrentDepth;
            int targetDepth   = originalDepth + 1;

            if (context.IsStartOfDocument)
            {
                targetDepth += 2;
            }

            while (context.Read())
            {
                if (context.IsStartElement || context.IsAttribute)
                {
                    if (context.TestExpression("Marker", targetDepth))
                    {
                        describeClusterSecurityGroupsResult.Marker = StringUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("ClusterSecurityGroups/ClusterSecurityGroup", targetDepth))
                    {
                        describeClusterSecurityGroupsResult.ClusterSecurityGroups.Add(ClusterSecurityGroupUnmarshaller.GetInstance().Unmarshall(context));

                        continue;
                    }
                }
                else if (context.IsEndElement && context.CurrentDepth < originalDepth)
                {
                    return(describeClusterSecurityGroupsResult);
                }
            }



            return(describeClusterSecurityGroupsResult);
        }