public static ConnectionDrainingUnmarshaller GetInstance() { if (instance == null) { instance = new ConnectionDrainingUnmarshaller(); } return(instance); }
public LoadBalancerAttributes Unmarshall(XmlUnmarshallerContext context) { LoadBalancerAttributes loadBalancerAttributes = new LoadBalancerAttributes(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 2; } while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("CrossZoneLoadBalancing", targetDepth)) { loadBalancerAttributes.CrossZoneLoadBalancing = CrossZoneLoadBalancingUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("AccessLog", targetDepth)) { loadBalancerAttributes.AccessLog = AccessLogUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ConnectionDraining", targetDepth)) { loadBalancerAttributes.ConnectionDraining = ConnectionDrainingUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return(loadBalancerAttributes); } } return(loadBalancerAttributes); }