public DescribeEventCategoriesResult Unmarshall(XmlUnmarshallerContext context)
        {
            DescribeEventCategoriesResult describeEventCategoriesResult = new DescribeEventCategoriesResult();
            int originalDepth = context.CurrentDepth;
            int targetDepth   = originalDepth + 1;

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

            while (context.Read())
            {
                if (context.IsStartElement || context.IsAttribute)
                {
                    if (context.TestExpression("EventCategoriesMapList/EventCategoriesMap", targetDepth))
                    {
                        describeEventCategoriesResult.EventCategoriesMapList.Add(EventCategoriesMapUnmarshaller.GetInstance().Unmarshall(context));

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



            return(describeEventCategoriesResult);
        }
        private static void UnmarshallResult(XmlUnmarshallerContext context, DescribeEventCategoriesResponse 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("EventCategoriesMapList/EventCategoriesMap", targetDepth))
                    {
                        response.EventCategoriesMapList.Add(EventCategoriesMapUnmarshaller.GetInstance().Unmarshall(context));

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



            return;
        }