public static ReservedInstancesConfigurationUnmarshaller GetInstance() { if (instance == null) { instance = new ReservedInstancesConfigurationUnmarshaller(); } return(instance); }
public ReservedInstancesModificationResult Unmarshall(XmlUnmarshallerContext context) { ReservedInstancesModificationResult reservedInstancesModificationResult = new ReservedInstancesModificationResult(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 1; } while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("reservedInstancesId", targetDepth)) { reservedInstancesModificationResult.ReservedInstancesId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("targetConfiguration", targetDepth)) { reservedInstancesModificationResult.TargetConfiguration = ReservedInstancesConfigurationUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return(reservedInstancesModificationResult); } } return(reservedInstancesModificationResult); }