public static ServiceEndpointUnmarshaller GetInstance() { if (instance == null) { instance = new ServiceEndpointUnmarshaller(); } return(instance); }
public DomainStatus Unmarshall(XmlUnmarshallerContext context) { DomainStatus domainStatus = new DomainStatus(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 2; } while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("DomainId", targetDepth)) { domainStatus.DomainId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("DomainName", targetDepth)) { domainStatus.DomainName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Created", targetDepth)) { domainStatus.Created = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Deleted", targetDepth)) { domainStatus.Deleted = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("NumSearchableDocs", targetDepth)) { domainStatus.NumSearchableDocs = LongUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("DocService", targetDepth)) { domainStatus.DocService = ServiceEndpointUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("SearchService", targetDepth)) { domainStatus.SearchService = ServiceEndpointUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("RequiresIndexDocuments", targetDepth)) { domainStatus.RequiresIndexDocuments = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Processing", targetDepth)) { domainStatus.Processing = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("SearchInstanceType", targetDepth)) { domainStatus.SearchInstanceType = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("SearchPartitionCount", targetDepth)) { domainStatus.SearchPartitionCount = IntUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("SearchInstanceCount", targetDepth)) { domainStatus.SearchInstanceCount = IntUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return(domainStatus); } } return(domainStatus); }