Ejemplo n.º 1
0
        public LifecycleTransition Unmarshall(XmlUnmarshallerContext context)
        {
            LifecycleTransition transition = new LifecycleTransition();
            int originalDepth = context.CurrentDepth;
            int targetDepth   = originalDepth + 1;

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

            while (context.Read())
            {
                if (context.IsStartElement || context.IsAttribute)
                {
                    if (context.TestExpression("Date", targetDepth))
                    {
                        transition.DateUtc = DateTimeUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("Days", targetDepth))
                    {
                        transition.Days = IntUnmarshaller.GetInstance().Unmarshall(context);

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

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



            return(transition);
        }
        public LifecycleRuleExpiration Unmarshall(XmlUnmarshallerContext context)
        {
            LifecycleRuleExpiration expiration = new LifecycleRuleExpiration();
            int originalDepth = context.CurrentDepth;
            int targetDepth   = originalDepth + 1;

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

            while (context.Read())
            {
                if (context.IsStartElement || context.IsAttribute)
                {
                    if (context.TestExpression("Date", targetDepth))
                    {
                        expiration.DateUtc = DateTimeUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("Days", targetDepth))
                    {
                        expiration.Days = IntUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("ExpiredObjectDeleteMarker", targetDepth))
                    {
                        expiration.ExpiredObjectDeleteMarker = BoolUnmarshaller.GetInstance().Unmarshall(context);

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



            return(expiration);
        }
        public ActiveTrustedSigners Unmarshall(XmlUnmarshallerContext context)
        {
            ActiveTrustedSigners activeTrustedSigners = new ActiveTrustedSigners();
            int originalDepth = context.CurrentDepth;
            int targetDepth   = originalDepth + 1;

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

            while (context.Read())
            {
                if (context.IsStartElement || context.IsAttribute)
                {
                    if (context.TestExpression("Enabled", targetDepth))
                    {
                        activeTrustedSigners.Enabled = BoolUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("Quantity", targetDepth))
                    {
                        activeTrustedSigners.Quantity = IntUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("Items/Signer", targetDepth))
                    {
                        activeTrustedSigners.Items.Add(SignerUnmarshaller.GetInstance().Unmarshall(context));

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



            return(activeTrustedSigners);
        }
        public GetFederationTokenResult Unmarshall(XmlUnmarshallerContext context)
        {
            GetFederationTokenResult getFederationTokenResult = new GetFederationTokenResult();
            int originalDepth = context.CurrentDepth;
            int targetDepth   = originalDepth + 1;

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

            while (context.Read())
            {
                if (context.IsStartElement || context.IsAttribute)
                {
                    if (context.TestExpression("Credentials", targetDepth))
                    {
                        getFederationTokenResult.Credentials = CredentialsUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("FederatedUser", targetDepth))
                    {
                        getFederationTokenResult.FederatedUser = FederatedUserUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("PackedPolicySize", targetDepth))
                    {
                        getFederationTokenResult.PackedPolicySize = IntUnmarshaller.GetInstance().Unmarshall(context);

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



            return(getFederationTokenResult);
        }
        public PendingModifiedValues Unmarshall(XmlUnmarshallerContext context)
        {
            PendingModifiedValues pendingModifiedValues = new PendingModifiedValues();
            int originalDepth = context.CurrentDepth;
            int targetDepth   = originalDepth + 1;

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

            while (context.Read())
            {
                if (context.IsStartElement || context.IsAttribute)
                {
                    if (context.TestExpression("NumCacheNodes", targetDepth))
                    {
                        pendingModifiedValues.NumCacheNodes = IntUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("CacheNodeIdsToRemove/CacheNodeId", targetDepth))
                    {
                        pendingModifiedValues.CacheNodeIdsToRemove.Add(StringUnmarshaller.GetInstance().Unmarshall(context));

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

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



            return(pendingModifiedValues);
        }
Ejemplo n.º 6
0
        private static void UnmarshallResult(XmlUnmarshallerContext context, AssumeRoleWithSAMLResponse 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("Credentials", targetDepth))
                    {
                        response.Credentials = CredentialsUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("AssumedRoleUser", targetDepth))
                    {
                        response.AssumedRoleUser = AssumedRoleUserUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("PackedPolicySize", targetDepth))
                    {
                        response.PackedPolicySize = IntUnmarshaller.GetInstance().Unmarshall(context);

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



            return;
        }
Ejemplo n.º 7
0
        private static void UnmarshallResult(XmlUnmarshallerContext context, ListObjectsByTagsResponse response)
        {
            int num = context.get_CurrentDepth();

            if (context.get_IsStartOfDocument())
            {
                num += 2;
            }
            while (context.Read())
            {
                if (context.get_IsStartElement() || context.get_IsAttribute())
                {
                    if (context.TestExpression("Bucket", num))
                    {
                        response.BucketName = StringUnmarshaller.GetInstance().Unmarshall(context);
                    }
                    else if (context.TestExpression("ContinuationToken", num))
                    {
                        response.ContinuationToken = StringUnmarshaller.GetInstance().Unmarshall(context);
                    }
                    else if (context.TestExpression("NextContinuationToken", num))
                    {
                        response.NextContinuationToken = StringUnmarshaller.GetInstance().Unmarshall(context);
                    }
                    else if (context.TestExpression("MaxKeys", num))
                    {
                        response.MaxKeys = IntUnmarshaller.GetInstance().Unmarshall(context);
                    }
                    else if (context.TestExpression("IsTruncated", num))
                    {
                        response.IsTruncated = BoolUnmarshaller.GetInstance().Unmarshall(context);
                    }
                    else if (context.TestExpression("EncodingType", num))
                    {
                        response.EncodingType = EncodingType.FindValue(StringUnmarshaller.GetInstance().Unmarshall(context));
                    }
                    else if (context.TestExpression("Contents", num))
                    {
                        response.Contents.Add(TaggedResourceUnmarshaller.Instance.Unmarshall(context));
                    }
                }
            }
        }
Ejemplo n.º 8
0
        public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
        {
            DescribeSnapshotScheduleResponse response = new DescribeSnapshotScheduleResponse();

            context.Read();
            int targetDepth = context.CurrentDepth;

            while (context.ReadAtDepth(targetDepth))
            {
                if (context.TestExpression("VolumeARN", targetDepth))
                {
                    response.VolumeARN = StringUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("StartAt", targetDepth))
                {
                    response.StartAt = IntUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("RecurrenceInHours", targetDepth))
                {
                    response.RecurrenceInHours = IntUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

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

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

            return(response);
        }
Ejemplo n.º 9
0
        public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
        {
            DescribeMaintenanceStartTimeResponse response = new DescribeMaintenanceStartTimeResponse();

            context.Read();
            int targetDepth = context.CurrentDepth;

            while (context.ReadAtDepth(targetDepth))
            {
                if (context.TestExpression("GatewayARN", targetDepth))
                {
                    response.GatewayARN = StringUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("HourOfDay", targetDepth))
                {
                    response.HourOfDay = IntUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("MinuteOfHour", targetDepth))
                {
                    response.MinuteOfHour = IntUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("DayOfWeek", targetDepth))
                {
                    response.DayOfWeek = IntUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

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

            return(response);
        }
Ejemplo n.º 10
0
        public DeviceiSCSIAttributes Unmarshall(JsonUnmarshallerContext context)
        {
            context.Read();
            if (context.CurrentTokenType == JsonToken.Null)
            {
                return(null);
            }
            DeviceiSCSIAttributes deviceiSCSIAttributes = new DeviceiSCSIAttributes();


            int targetDepth = context.CurrentDepth;

            while (context.ReadAtDepth(targetDepth))
            {
                if (context.TestExpression("TargetARN", targetDepth))
                {
                    deviceiSCSIAttributes.TargetARN = StringUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

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

                if (context.TestExpression("NetworkInterfacePort", targetDepth))
                {
                    deviceiSCSIAttributes.NetworkInterfacePort = IntUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("ChapEnabled", targetDepth))
                {
                    deviceiSCSIAttributes.ChapEnabled = BoolUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }
            }

            return(deviceiSCSIAttributes);
        }
Ejemplo n.º 11
0
        public WorkflowExecutionOpenCounts Unmarshall(JsonUnmarshallerContext context)
        {
            context.Read();
            if (context.CurrentTokenType == JsonToken.Null)
            {
                return(null);
            }
            WorkflowExecutionOpenCounts workflowExecutionOpenCounts = new WorkflowExecutionOpenCounts();


            int targetDepth = context.CurrentDepth;

            while (context.ReadAtDepth(targetDepth))
            {
                if (context.TestExpression("openActivityTasks", targetDepth))
                {
                    workflowExecutionOpenCounts.OpenActivityTasks = IntUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("openDecisionTasks", targetDepth))
                {
                    workflowExecutionOpenCounts.OpenDecisionTasks = IntUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("openTimers", targetDepth))
                {
                    workflowExecutionOpenCounts.OpenTimers = IntUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("openChildWorkflowExecutions", targetDepth))
                {
                    workflowExecutionOpenCounts.OpenChildWorkflowExecutions = IntUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }
            }

            return(workflowExecutionOpenCounts);
        }
        public WorkflowExecutionCount Unmarshall(JsonUnmarshallerContext context)
        {
            if (context.CurrentTokenType == JsonToken.Null)
            {
                return(null);
            }

            WorkflowExecutionCount workflowExecutionCount = new WorkflowExecutionCount();



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

            while (context.Read())
            {
                if (context.TestExpression("count", targetDepth))
                {
                    context.Read();
                    workflowExecutionCount.Count = IntUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("truncated", targetDepth))
                {
                    context.Read();
                    workflowExecutionCount.Truncated = BoolUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.CurrentDepth <= originalDepth)
                {
                    return(workflowExecutionCount);
                }
            }


            return(workflowExecutionCount);
        }
Ejemplo n.º 13
0
        public ConnectionDraining Unmarshall(XmlUnmarshallerContext context)
        {
            ConnectionDraining connectionDraining = new ConnectionDraining();
            int originalDepth = context.CurrentDepth;
            int targetDepth   = originalDepth + 1;

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

            while (context.Read())
            {
                if (context.IsStartElement || context.IsAttribute)
                {
                    if (context.TestExpression("Enabled", targetDepth))
                    {
                        connectionDraining.Enabled = BoolUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("Timeout", targetDepth))
                    {
                        connectionDraining.Timeout = IntUnmarshaller.GetInstance().Unmarshall(context);

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



            return(connectionDraining);
        }
        public PricingDetail Unmarshall(XmlUnmarshallerContext context)
        {
            PricingDetail pricingDetail = new PricingDetail();
            int           originalDepth = context.CurrentDepth;
            int           targetDepth   = originalDepth + 1;

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

            while (context.Read())
            {
                if (context.IsStartElement || context.IsAttribute)
                {
                    if (context.TestExpression("price", targetDepth))
                    {
                        pricingDetail.Price = DoubleUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("count", targetDepth))
                    {
                        pricingDetail.Count = IntUnmarshaller.GetInstance().Unmarshall(context);

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



            return(pricingDetail);
        }
        public PortRange Unmarshall(XmlUnmarshallerContext context)
        {
            PortRange portRange     = new PortRange();
            int       originalDepth = context.CurrentDepth;
            int       targetDepth   = originalDepth + 1;

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

            while (context.Read())
            {
                if (context.IsStartElement || context.IsAttribute)
                {
                    if (context.TestExpression("from", targetDepth))
                    {
                        portRange.From = IntUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("to", targetDepth))
                    {
                        portRange.To = IntUnmarshaller.GetInstance().Unmarshall(context);

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



            return(portRange);
        }
Ejemplo n.º 16
0
        public Origins Unmarshall(XmlUnmarshallerContext context)
        {
            Origins origins       = new Origins();
            int     originalDepth = context.CurrentDepth;
            int     targetDepth   = originalDepth + 1;

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

            while (context.Read())
            {
                if (context.IsStartElement || context.IsAttribute)
                {
                    if (context.TestExpression("Quantity", targetDepth))
                    {
                        origins.Quantity = IntUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("Items/Origin", targetDepth))
                    {
                        origins.Items.Add(OriginUnmarshaller.GetInstance().Unmarshall(context));

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



            return(origins);
        }
Ejemplo n.º 17
0
        public Ebs Unmarshall(XmlUnmarshallerContext context)
        {
            Ebs ebs           = new Ebs();
            int originalDepth = context.CurrentDepth;
            int targetDepth   = originalDepth + 1;

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

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

                        continue;
                    }
                    if (context.TestExpression("VolumeSize", targetDepth))
                    {
                        ebs.VolumeSize = IntUnmarshaller.GetInstance().Unmarshall(context);

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



            return(ebs);
        }
Ejemplo n.º 18
0
        public Endpoint Unmarshall(XmlUnmarshallerContext context)
        {
            Endpoint endpoint      = new Endpoint();
            int      originalDepth = context.CurrentDepth;
            int      targetDepth   = originalDepth + 1;

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

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

                        continue;
                    }
                    if (context.TestExpression("Port", targetDepth))
                    {
                        endpoint.Port = IntUnmarshaller.GetInstance().Unmarshall(context);

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



            return(endpoint);
        }
        public IcmpTypeCode Unmarshall(XmlUnmarshallerContext context)
        {
            IcmpTypeCode icmpTypeCode  = new IcmpTypeCode();
            int          originalDepth = context.CurrentDepth;
            int          targetDepth   = originalDepth + 1;

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

            while (context.Read())
            {
                if (context.IsStartElement || context.IsAttribute)
                {
                    if (context.TestExpression("type", targetDepth))
                    {
                        icmpTypeCode.Type = IntUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("code", targetDepth))
                    {
                        icmpTypeCode.Code = IntUnmarshaller.GetInstance().Unmarshall(context);

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



            return(icmpTypeCode);
        }
        public AllowedMethods Unmarshall(XmlUnmarshallerContext context)
        {
            AllowedMethods allowedMethods = new AllowedMethods();
            int            originalDepth  = context.CurrentDepth;
            int            targetDepth    = originalDepth + 1;

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

            while (context.Read())
            {
                if (context.IsStartElement || context.IsAttribute)
                {
                    if (context.TestExpression("Quantity", targetDepth))
                    {
                        allowedMethods.Quantity = IntUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("Items/Method", targetDepth))
                    {
                        allowedMethods.Items.Add(StringUnmarshaller.GetInstance().Unmarshall(context));

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



            return(allowedMethods);
        }
Ejemplo n.º 21
0
        public PartDetail Unmarshall(XmlUnmarshallerContext context)
        {
            PartDetail partDetail   = new PartDetail();
            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("ETag", num))
                    {
                        partDetail.ETag = StringUnmarshaller.GetInstance().Unmarshall(context);
                    }
                    else if (context.TestExpression("LastModified", num))
                    {
                        partDetail.LastModified = DateTimeUnmarshaller.GetInstance().Unmarshall(context);
                    }
                    else if (context.TestExpression("PartNumber", num))
                    {
                        partDetail.PartNumber = IntUnmarshaller.GetInstance().Unmarshall(context);
                    }
                    else if (context.TestExpression("Size", num))
                    {
                        partDetail.Size = IntUnmarshaller.GetInstance().Unmarshall(context);
                    }
                }
                else if (context.get_IsEndElement() && context.get_CurrentDepth() < currentDepth)
                {
                    return(partDetail);
                }
            }
            return(partDetail);
        }
Ejemplo n.º 22
0
        public ScalingParameters Unmarshall(XmlUnmarshallerContext context)
        {
            ScalingParameters scalingParameters = new ScalingParameters();
            int originalDepth = context.CurrentDepth;
            int targetDepth   = originalDepth + 1;

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

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

                        continue;
                    }
                    if (context.TestExpression("DesiredReplicationCount", targetDepth))
                    {
                        scalingParameters.DesiredReplicationCount = IntUnmarshaller.GetInstance().Unmarshall(context);

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



            return(scalingParameters);
        }
        public BackendServerDescription Unmarshall(XmlUnmarshallerContext context)
        {
            BackendServerDescription backendServerDescription = new BackendServerDescription();
            int originalDepth = context.CurrentDepth;
            int targetDepth   = originalDepth + 1;

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

            while (context.Read())
            {
                if (context.IsStartElement || context.IsAttribute)
                {
                    if (context.TestExpression("InstancePort", targetDepth))
                    {
                        backendServerDescription.InstancePort = IntUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("PolicyNames/member", targetDepth))
                    {
                        backendServerDescription.PolicyNames.Add(StringUnmarshaller.GetInstance().Unmarshall(context));

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



            return(backendServerDescription);
        }
Ejemplo n.º 24
0
        public InstanceCount Unmarshall(XmlUnmarshallerContext context)
        {
            InstanceCount instanceCount = new InstanceCount();
            int           originalDepth = context.CurrentDepth;
            int           targetDepth   = originalDepth + 1;

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

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

                        continue;
                    }
                    if (context.TestExpression("instanceCount", targetDepth))
                    {
                        instanceCount.Count = IntUnmarshaller.GetInstance().Unmarshall(context);

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



            return(instanceCount);
        }
        public CustomErrorResponses Unmarshall(XmlUnmarshallerContext context)
        {
            CustomErrorResponses customErrorResponses = new CustomErrorResponses();
            int originalDepth = context.CurrentDepth;
            int targetDepth   = originalDepth + 1;

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

            while (context.Read())
            {
                if (context.IsStartElement || context.IsAttribute)
                {
                    if (context.TestExpression("Quantity", targetDepth))
                    {
                        customErrorResponses.Quantity = IntUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("Items/CustomErrorResponse", targetDepth))
                    {
                        customErrorResponses.Items.Add(CustomErrorResponseUnmarshaller.GetInstance().Unmarshall(context));

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



            return(customErrorResponses);
        }
        public CacheBehaviors Unmarshall(XmlUnmarshallerContext context)
        {
            CacheBehaviors cacheBehaviors = new CacheBehaviors();
            int            originalDepth  = context.CurrentDepth;
            int            targetDepth    = originalDepth + 1;

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

            while (context.Read())
            {
                if (context.IsStartElement || context.IsAttribute)
                {
                    if (context.TestExpression("Quantity", targetDepth))
                    {
                        cacheBehaviors.Quantity = IntUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("Items/CacheBehavior", targetDepth))
                    {
                        cacheBehaviors.Items.Add(CacheBehaviorUnmarshaller.GetInstance().Unmarshall(context));

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



            return(cacheBehaviors);
        }
Ejemplo n.º 27
0
        public Listener Unmarshall(XmlUnmarshallerContext context)
        {
            Listener listener      = new Listener();
            int      originalDepth = context.CurrentDepth;
            int      targetDepth   = originalDepth + 1;

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

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

                        continue;
                    }
                    if (context.TestExpression("Port", targetDepth))
                    {
                        listener.Port = IntUnmarshaller.GetInstance().Unmarshall(context);

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



            return(listener);
        }
Ejemplo n.º 28
0
        private static void UnmarshallResult(XmlUnmarshallerContext context, DescribeAccountLimitsResponse 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("MaxNumberOfAutoScalingGroups", targetDepth))
                    {
                        response.MaxNumberOfAutoScalingGroups = IntUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("MaxNumberOfLaunchConfigurations", targetDepth))
                    {
                        response.MaxNumberOfLaunchConfigurations = IntUnmarshaller.GetInstance().Unmarshall(context);

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



            return;
        }
        public LifecycleRuleNoncurrentVersionExpiration Unmarshall(XmlUnmarshallerContext context)
        {
            LifecycleRuleNoncurrentVersionExpiration expiration = new LifecycleRuleNoncurrentVersionExpiration();
            int originalDepth = context.CurrentDepth;
            int targetDepth   = originalDepth + 1;

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

            while (context.Read())
            {
                if (context.IsStartElement || context.IsAttribute)
                {
                    if (context.TestExpression("NewerNoncurrentVersions", targetDepth))
                    {
                        expiration.NewerNoncurrentVersions = IntUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("NoncurrentDays", targetDepth))
                    {
                        expiration.NoncurrentDays = IntUnmarshaller.GetInstance().Unmarshall(context);

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

            return(expiration);
        }
Ejemplo n.º 30
0
        public Tiering Unmarshall(XmlUnmarshallerContext context)
        {
            Tiering tiering       = new Tiering();
            int     originalDepth = context.CurrentDepth;
            int     targetDepth   = originalDepth + 1;

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

            while (context.Read())
            {
                if (context.IsStartElement || context.IsAttribute)
                {
                    if (context.TestExpression("Days", targetDepth))
                    {
                        tiering.Days = IntUnmarshaller.GetInstance().Unmarshall(context);

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

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

            return(tiering);
        }