public AnalyticsS3BucketDestination Unmarshall(XmlUnmarshallerContext context) { AnalyticsS3BucketDestination AnalyticsS3BucketDestination = new AnalyticsS3BucketDestination(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 2; } while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("Format", targetDepth)) { AnalyticsS3BucketDestination.Format = AnalyticsS3ExportFileFormat.FindValue(StringUnmarshaller.Instance.Unmarshall(context)); continue; } if (context.TestExpression("BucketAccountId", targetDepth)) { AnalyticsS3BucketDestination.BucketAccountId = StringUnmarshaller.Instance.Unmarshall(context); continue; } if (context.TestExpression("Bucket", targetDepth)) { AnalyticsS3BucketDestination.BucketName = StringUnmarshaller.Instance.Unmarshall(context); continue; } if (context.TestExpression("Prefix", targetDepth)) { AnalyticsS3BucketDestination.Prefix = StringUnmarshaller.Instance.Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return(AnalyticsS3BucketDestination); } } return(AnalyticsS3BucketDestination); }
public AnalyticsS3BucketDestination Unmarshall(XmlUnmarshallerContext context) { AnalyticsS3BucketDestination analyticsS3BucketDestination = new AnalyticsS3BucketDestination(); 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("Format", num)) { analyticsS3BucketDestination.Format = ConstantClass.op_Implicit(AnalyticsS3ExportFileFormat.FindValue(StringUnmarshaller.get_Instance().Unmarshall(context))); } else if (context.TestExpression("BucketAccountId", num)) { analyticsS3BucketDestination.BucketAccountId = StringUnmarshaller.get_Instance().Unmarshall(context); } else if (context.TestExpression("Bucket", num)) { analyticsS3BucketDestination.BucketName = StringUnmarshaller.get_Instance().Unmarshall(context); } else if (context.TestExpression("Prefix", num)) { analyticsS3BucketDestination.Prefix = StringUnmarshaller.get_Instance().Unmarshall(context); } } else if (context.get_IsEndElement() && context.get_CurrentDepth() < currentDepth) { return(analyticsS3BucketDestination); } } return(analyticsS3BucketDestination); }