public CreateInvalidationResult Unmarshall(XmlUnmarshallerContext context) { CreateInvalidationResult createInvalidationResult = new CreateInvalidationResult(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("Invalidation", targetDepth)) { createInvalidationResult.Invalidation = InvalidationUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return(createInvalidationResult); } } createInvalidationResult.Location = context.Headers["Location"]; return(createInvalidationResult); }
private static void UnmarshallResult(XmlUnmarshallerContext context, GetInvalidationResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("Invalidation", targetDepth)) { response.Invalidation = InvalidationUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return; } } return; }
private static void UnmarshallResult(XmlUnmarshallerContext context, CreateInvalidationResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("Invalidation", targetDepth)) { response.Invalidation = InvalidationUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return; } } IWebResponseData responseData = context.ResponseData; if (responseData.IsHeaderPresent("Location")) { response.Location = responseData.GetHeaderValue("Location"); } return; }
public static InvalidationUnmarshaller GetInstance() { if (instance == null) { instance = new InvalidationUnmarshaller(); } return(instance); }