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

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

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

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



            return(result);
        }
Exemplo n.º 3
0
        public static OptionGroupUnmarshaller GetInstance()
        {
            if (instance == null)
            {
                instance = new OptionGroupUnmarshaller();
            }

            return(instance);
        }
Exemplo n.º 4
0
        public DescribeOptionGroupsResult Unmarshall(XmlUnmarshallerContext context)
        {
            DescribeOptionGroupsResult describeOptionGroupsResult = new DescribeOptionGroupsResult();
            int originalDepth = context.CurrentDepth;
            int targetDepth   = originalDepth + 1;

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

            while (context.Read())
            {
                if (context.IsStartElement || context.IsAttribute)
                {
                    if (context.TestExpression("OptionGroupsList/OptionGroup", targetDepth))
                    {
                        describeOptionGroupsResult.OptionGroupsList.Add(OptionGroupUnmarshaller.GetInstance().Unmarshall(context));

                        continue;
                    }
                    if (context.TestExpression("Marker", targetDepth))
                    {
                        describeOptionGroupsResult.Marker = StringUnmarshaller.GetInstance().Unmarshall(context);

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



            return(describeOptionGroupsResult);
        }