public InstanceStatus Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) { return(null); } InstanceStatus instanceStatus = new InstanceStatus(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("State", targetDepth)) { instanceStatus.State = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("StateChangeReason", targetDepth)) { instanceStatus.StateChangeReason = InstanceStateChangeReasonUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Timeline", targetDepth)) { instanceStatus.Timeline = InstanceTimelineUnmarshaller.GetInstance().Unmarshall(context); continue; } } return(instanceStatus); }
public static InstanceStateChangeReasonUnmarshaller GetInstance() { if (instance == null) { instance = new InstanceStateChangeReasonUnmarshaller(); } return(instance); }