Amazon.S3.Model.Internal.MarshallTransformations.GetBucketMetricsConfigurationResponseUnmarshaller.UnmarshallResult C# (CSharp) Метод

UnmarshallResult() приватный статический Метод

private static UnmarshallResult ( Amazon.Runtime.Internal.Transform.XmlUnmarshallerContext context, GetBucketMetricsConfigurationResponse response ) : void
context Amazon.Runtime.Internal.Transform.XmlUnmarshallerContext
response Amazon.S3.Model.GetBucketMetricsConfigurationResponse
Результат void
        private static void UnmarshallResult(XmlUnmarshallerContext context, GetBucketMetricsConfigurationResponse response)
        {

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

            if (context.IsStartOfDocument)
                targetDepth += 2;

            response.MetricsConfiguration = new MetricsConfiguration();

            while (context.Read())
            {
                if (context.IsStartElement || context.IsAttribute)
                {
                    if (context.TestExpression("Filter", targetDepth))
                    {
                        response.MetricsConfiguration.MetricsFilter = new MetricsFilter(){
                            MetricsFilterPredicate =  (MetricsPredicateListFilterUnmarshaller.Instance.Unmarshall(context))[0]
                    };
                        continue;
                    }
                    if (context.TestExpression("Id", targetDepth))
                    {
                        response.MetricsConfiguration.MetricsId = StringUnmarshaller.Instance.Unmarshall(context);

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



            return;
        }
GetBucketMetricsConfigurationResponseUnmarshaller