public static EnvironmentResourcesDescriptionUnmarshaller GetInstance() { if (instance == null) { instance = new EnvironmentResourcesDescriptionUnmarshaller(); } return(instance); }
public CreateEnvironmentResult Unmarshall(UnmarshallerContext context) { CreateEnvironmentResult createEnvironmentResult = new CreateEnvironmentResult(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 2; } while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("EnvironmentName", targetDepth)) { createEnvironmentResult.EnvironmentName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("EnvironmentId", targetDepth)) { createEnvironmentResult.EnvironmentId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ApplicationName", targetDepth)) { createEnvironmentResult.ApplicationName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("VersionLabel", targetDepth)) { createEnvironmentResult.VersionLabel = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("SolutionStackName", targetDepth)) { createEnvironmentResult.SolutionStackName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("TemplateName", targetDepth)) { createEnvironmentResult.TemplateName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Description", targetDepth)) { createEnvironmentResult.Description = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("EndpointURL", targetDepth)) { createEnvironmentResult.EndpointURL = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("CNAME", targetDepth)) { createEnvironmentResult.CNAME = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("DateCreated", targetDepth)) { createEnvironmentResult.DateCreated = DateTimeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("DateUpdated", targetDepth)) { createEnvironmentResult.DateUpdated = DateTimeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Status", targetDepth)) { createEnvironmentResult.Status = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Health", targetDepth)) { createEnvironmentResult.Health = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Resources", targetDepth)) { createEnvironmentResult.Resources = EnvironmentResourcesDescriptionUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return(createEnvironmentResult); } } return(createEnvironmentResult); }