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

            while (context.Read())
            {
                if (context.IsStartElement || context.IsAttribute)
                {
                    if (context.TestExpression("CloudFrontOriginAccessIdentity", targetDepth))
                    {
                        response.CloudFrontOriginAccessIdentity = CloudFrontOriginAccessIdentityUnmarshaller.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;
        }
Esempio n. 2
0
        public static CloudFrontOriginAccessIdentityUnmarshaller GetInstance()
        {
            if (instance == null)
            {
                instance = new CloudFrontOriginAccessIdentityUnmarshaller();
            }

            return(instance);
        }
Esempio n. 3
0
        public CreateCloudFrontOriginAccessIdentityResult Unmarshall(XmlUnmarshallerContext context)
        {
            CreateCloudFrontOriginAccessIdentityResult createCloudFrontOriginAccessIdentityResult = new CreateCloudFrontOriginAccessIdentityResult();
            int originalDepth = context.CurrentDepth;
            int targetDepth   = originalDepth + 1;

            while (context.Read())
            {
                if (context.IsStartElement || context.IsAttribute)
                {
                    if (context.TestExpression("CloudFrontOriginAccessIdentity", targetDepth))
                    {
                        createCloudFrontOriginAccessIdentityResult.CloudFrontOriginAccessIdentity = CloudFrontOriginAccessIdentityUnmarshaller.GetInstance().Unmarshall(context);

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


            createCloudFrontOriginAccessIdentityResult.Location = context.Headers["Location"];
            createCloudFrontOriginAccessIdentityResult.ETag     = context.Headers["ETag"];


            return(createCloudFrontOriginAccessIdentityResult);
        }