public BootstrapActionDetail Unmarshall(XmlUnmarshallerContext context) { BootstrapActionDetail bootstrapActionDetail = new BootstrapActionDetail(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 2; } while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("BootstrapActionConfig", targetDepth)) { bootstrapActionDetail.BootstrapActionConfig = BootstrapActionConfigUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return(bootstrapActionDetail); } } return(bootstrapActionDetail); }
public BootstrapActionDetail Unmarshall(JsonUnmarshallerContext context) { if (context.CurrentTokenType == JsonToken.Null) { return(null); } BootstrapActionDetail bootstrapActionDetail = new BootstrapActionDetail(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; while (context.Read()) { if (context.TestExpression("BootstrapActionConfig", targetDepth)) { context.Read(); bootstrapActionDetail.BootstrapActionConfig = BootstrapActionConfigUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.CurrentDepth <= originalDepth) { return(bootstrapActionDetail); } } return(bootstrapActionDetail); }
public BootstrapActionDetail Unmarshall(JsonUnmarshallerContext context) { BootstrapActionDetail bootstrapActionDetail = new BootstrapActionDetail(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; while (context.Read()) { if ((context.IsKey) && (context.CurrentDepth == targetDepth)) { context.Read(); context.Read(); if (context.TestExpression("BootstrapActionConfig", targetDepth)) { bootstrapActionDetail.BootstrapActionConfig = BootstrapActionConfigUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth <= originalDepth) { return(bootstrapActionDetail); } } return(bootstrapActionDetail); }
public static BootstrapActionConfigUnmarshaller GetInstance() { if (instance == null) { instance = new BootstrapActionConfigUnmarshaller(); } return(instance); }