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

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

private static UnmarshallResult ( Amazon.Runtime.Internal.Transform.XmlUnmarshallerContext context, Amazon.S3.Model.ListVersionsResponse response ) : void
context Amazon.Runtime.Internal.Transform.XmlUnmarshallerContext
response Amazon.S3.Model.ListVersionsResponse
Результат void
        private static void UnmarshallResult(XmlUnmarshallerContext context,ListVersionsResponse 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("IsTruncated", targetDepth))
                    {
                        response.IsTruncated = BoolUnmarshaller.GetInstance().Unmarshall(context);
                            
                        continue;
                    }
                    if (context.TestExpression("KeyMarker", targetDepth))
                    {
                        response.KeyMarker = StringUnmarshaller.GetInstance().Unmarshall(context);
                            
                        continue;
                    }
                    if (context.TestExpression("Delimiter", targetDepth))
                    {
                        response.Delimiter = StringUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    } 
                    if (context.TestExpression("VersionIdMarker", targetDepth))
                    {
                        response.VersionIdMarker = StringUnmarshaller.GetInstance().Unmarshall(context);
                            
                        continue;
                    }
                    if (context.TestExpression("NextKeyMarker", targetDepth))
                    {
                        response.NextKeyMarker = StringUnmarshaller.GetInstance().Unmarshall(context);
                            
                        continue;
                    }
                    if (context.TestExpression("NextVersionIdMarker", targetDepth))
                    {
                        response.NextVersionIdMarker = StringUnmarshaller.GetInstance().Unmarshall(context);
                            
                        continue;
                    }
                    if (context.TestExpression("Version", targetDepth))
                    {
                        response.Versions.Add(VersionsItemUnmarshaller.GetInstance().Unmarshall(context));
                            
                        continue;
                    }
                    if (context.TestExpression("DeleteMarker", targetDepth))
                    {
                        var version = VersionsItemUnmarshaller.GetInstance().Unmarshall(context);
                        version.IsDeleteMarker = true;
                        response.Versions.Add(version);
                            
                        continue;
                    }
                    if (context.TestExpression("Name", targetDepth))
                    {
                        response.Name = StringUnmarshaller.GetInstance().Unmarshall(context);
                            
                        continue;
                    }
                    if (context.TestExpression("Prefix", targetDepth))
                    {
                        response.Prefix = StringUnmarshaller.GetInstance().Unmarshall(context);
                            
                        continue;
                    }
                    if (context.TestExpression("MaxKeys", targetDepth))
                    {
                        response.MaxKeys = IntUnmarshaller.GetInstance().Unmarshall(context);
                            
                        continue;
                    }
                    if (context.TestExpression("CommonPrefixes", targetDepth))
                    {
                        var prefix = CommonPrefixesItemUnmarshaller.GetInstance().Unmarshall(context);

                        if (prefix != null)
                            response.CommonPrefixes.Add(prefix);
                            
                        continue;
                    }
                }
                else if (context.IsEndElement && context.CurrentDepth < originalDepth)
                {
                    return;
                }
            }
                            


            return;
        }