Пример #1
0
        public InventoryConfiguration Unmarshall(XmlUnmarshallerContext context)
        {
            InventoryConfiguration inventoryConfiguration = new InventoryConfiguration();
            int currentDepth = context.get_CurrentDepth();
            int num          = currentDepth + 1;

            if (context.get_IsStartOfDocument())
            {
                num += 2;
            }
            while (context.Read())
            {
                if (context.get_IsStartElement() || context.get_IsAttribute())
                {
                    if (context.TestExpression("Destination", num))
                    {
                        inventoryConfiguration.Destination = InventoryDestinationUnmarshaller.Instance.Unmarshall(context);
                    }
                    else if (context.TestExpression("IsEnabled", num))
                    {
                        inventoryConfiguration.IsEnabled = BoolUnmarshaller.get_Instance().Unmarshall(context);
                    }
                    else if (context.TestExpression("Filter", num))
                    {
                        inventoryConfiguration.InventoryFilter = InventoryFilterUnmarshaller.Instance.Unmarshall(context);
                    }
                    else if (context.TestExpression("Id", num))
                    {
                        inventoryConfiguration.InventoryId = StringUnmarshaller.get_Instance().Unmarshall(context);
                    }
                    else if (context.TestExpression("IncludedObjectVersions", num))
                    {
                        inventoryConfiguration.IncludedObjectVersions = InventoryIncludedObjectVersions.FindValue(StringUnmarshaller.get_Instance().Unmarshall(context));
                    }
                    else if (context.TestExpression("Field", num + 1))
                    {
                        inventoryConfiguration.InventoryOptionalFields.Add(InventoryOptionalField.FindValue(StringUnmarshaller.get_Instance().Unmarshall(context)));
                    }
                    else if (context.TestExpression("Schedule", num))
                    {
                        inventoryConfiguration.Schedule = InventoryScheduleUnmarshaller.Instance.Unmarshall(context);
                    }
                }
                else if (context.get_IsEndElement() && context.get_CurrentDepth() < currentDepth)
                {
                    return(inventoryConfiguration);
                }
            }
            return(inventoryConfiguration);
        }
        private static void UnmarshallResult(XmlUnmarshallerContext context, GetBucketInventoryConfigurationResponse response)
        {
            int currentDepth = context.get_CurrentDepth();
            int num          = currentDepth + 1;

            if (context.get_IsStartOfDocument())
            {
                num += 2;
            }
            response.InventoryConfiguration = new InventoryConfiguration();
            while (context.Read())
            {
                if (context.get_IsStartElement() || context.get_IsAttribute())
                {
                    if (context.TestExpression("Destination", num))
                    {
                        response.InventoryConfiguration.Destination = InventoryDestinationUnmarshaller.Instance.Unmarshall(context);
                    }
                    else if (context.TestExpression("IsEnabled", num))
                    {
                        response.InventoryConfiguration.IsEnabled = BoolUnmarshaller.get_Instance().Unmarshall(context);
                    }
                    else if (context.TestExpression("Filter", num))
                    {
                        response.InventoryConfiguration.InventoryFilter = InventoryFilterUnmarshaller.Instance.Unmarshall(context);
                    }
                    else if (context.TestExpression("Id", num))
                    {
                        response.InventoryConfiguration.InventoryId = StringUnmarshaller.get_Instance().Unmarshall(context);
                    }
                    else if (context.TestExpression("IncludedObjectVersions", num))
                    {
                        response.InventoryConfiguration.IncludedObjectVersions = StringUnmarshaller.get_Instance().Unmarshall(context);
                    }
                    else if (context.TestExpression("Field", num + 1))
                    {
                        response.InventoryConfiguration.InventoryOptionalFields.Add(StringUnmarshaller.get_Instance().Unmarshall(context));
                    }
                    else if (context.TestExpression("Schedule", num))
                    {
                        response.InventoryConfiguration.Schedule = InventoryScheduleUnmarshaller.Instance.Unmarshall(context);
                    }
                }
                else if (context.get_IsEndElement() && context.get_CurrentDepth() < currentDepth)
                {
                    break;
                }
            }
        }
        private static void UnmarshallResult(XmlUnmarshallerContext context, ListBucketInventoryConfigurationsResponse response)
        {
            int currentDepth = context.get_CurrentDepth();
            int num          = currentDepth + 1;

            if (context.get_IsStartOfDocument())
            {
                num += 2;
            }
            while (context.Read())
            {
                if (context.get_IsStartElement() || context.get_IsAttribute())
                {
                    if (context.TestExpression("ContinuationToken", num))
                    {
                        response.Token = StringUnmarshaller.get_Instance().Unmarshall(context);
                    }
                    else if (context.TestExpression("InventoryConfiguration", num))
                    {
                        response.InventoryConfigurationList.Add(InventoryConfigurationUnmarshaller.Instance.Unmarshall(context));
                    }
                    else if (context.TestExpression("IsTruncated", num))
                    {
                        response.IsTruncated = BoolUnmarshaller.get_Instance().Unmarshall(context);
                    }
                    else if (context.TestExpression("NextContinuationToken", num))
                    {
                        response.NextToken = StringUnmarshaller.get_Instance().Unmarshall(context);
                    }
                }
                else if (context.get_IsEndElement() && context.get_CurrentDepth() < currentDepth)
                {
                    break;
                }
            }
        }