public static StreamingDistributionSummaryUnmarshaller GetInstance() { if (instance == null) { instance = new StreamingDistributionSummaryUnmarshaller(); } return(instance); }
public StreamingDistributionList Unmarshall(XmlUnmarshallerContext context) { StreamingDistributionList streamingDistributionList = new StreamingDistributionList(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 2; } while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("Marker", targetDepth)) { streamingDistributionList.Marker = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("NextMarker", targetDepth)) { streamingDistributionList.NextMarker = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("MaxItems", targetDepth)) { streamingDistributionList.MaxItems = IntUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("IsTruncated", targetDepth)) { streamingDistributionList.IsTruncated = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Quantity", targetDepth)) { streamingDistributionList.Quantity = IntUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Items/StreamingDistributionSummary", targetDepth)) { streamingDistributionList.Items.Add(StreamingDistributionSummaryUnmarshaller.GetInstance().Unmarshall(context)); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return(streamingDistributionList); } } return(streamingDistributionList); }