Exemplo n.º 1
0
        private static void UnmarshallResult(XmlUnmarshallerContext context, GetCloudFrontOriginAccessIdentityConfigResponse response)
        {
            int originalDepth = context.CurrentDepth;
            int targetDepth   = originalDepth + 1;

            while (context.Read())
            {
                if (context.IsStartElement || context.IsAttribute)
                {
                    if (context.TestExpression("CloudFrontOriginAccessIdentityConfig", targetDepth))
                    {
                        response.CloudFrontOriginAccessIdentityConfig = CloudFrontOriginAccessIdentityConfigUnmarshaller.GetInstance().Unmarshall(context);

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


            IWebResponseData responseData = context.ResponseData;

            if (responseData.IsHeaderPresent("ETag"))
            {
                response.ETag = responseData.GetHeaderValue("ETag");
            }


            return;
        }
Exemplo n.º 2
0
        public CloudFrontOriginAccessIdentity Unmarshall(XmlUnmarshallerContext context)
        {
            CloudFrontOriginAccessIdentity cloudFrontOriginAccessIdentity = new CloudFrontOriginAccessIdentity();
            int originalDepth = context.CurrentDepth;
            int targetDepth   = originalDepth + 1;

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

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

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

                        continue;
                    }
                    if (context.TestExpression("CloudFrontOriginAccessIdentityConfig", targetDepth))
                    {
                        cloudFrontOriginAccessIdentity.CloudFrontOriginAccessIdentityConfig = CloudFrontOriginAccessIdentityConfigUnmarshaller.GetInstance().Unmarshall(context);

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



            return(cloudFrontOriginAccessIdentity);
        }
Exemplo n.º 3
0
        public GetCloudFrontOriginAccessIdentityConfigResult Unmarshall(XmlUnmarshallerContext context)
        {
            GetCloudFrontOriginAccessIdentityConfigResult getCloudFrontOriginAccessIdentityConfigResult = new GetCloudFrontOriginAccessIdentityConfigResult();
            int originalDepth = context.CurrentDepth;
            int targetDepth   = originalDepth + 1;

            while (context.Read())
            {
                if (context.IsStartElement || context.IsAttribute)
                {
                    if (context.TestExpression("CloudFrontOriginAccessIdentityConfig", targetDepth))
                    {
                        getCloudFrontOriginAccessIdentityConfigResult.CloudFrontOriginAccessIdentityConfig = CloudFrontOriginAccessIdentityConfigUnmarshaller.GetInstance().Unmarshall(context);

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


            getCloudFrontOriginAccessIdentityConfigResult.ETag = context.Headers["ETag"];


            return(getCloudFrontOriginAccessIdentityConfigResult);
        }