Beispiel #1
0
        public InstanceGroupStatus Unmarshall(JsonUnmarshallerContext context)
        {
            context.Read();
            if (context.CurrentTokenType == JsonToken.Null)
            {
                return(null);
            }
            InstanceGroupStatus instanceGroupStatus = new InstanceGroupStatus();


            int targetDepth = context.CurrentDepth;

            while (context.ReadAtDepth(targetDepth))
            {
                if (context.TestExpression("State", targetDepth))
                {
                    instanceGroupStatus.State = StringUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("StateChangeReason", targetDepth))
                {
                    instanceGroupStatus.StateChangeReason = InstanceGroupStateChangeReasonUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("Timeline", targetDepth))
                {
                    instanceGroupStatus.Timeline = InstanceGroupTimelineUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }
            }

            return(instanceGroupStatus);
        }
Beispiel #2
0
 public static InstanceGroupStateChangeReasonUnmarshaller GetInstance()
 {
     if (instance == null)
     {
         instance = new InstanceGroupStateChangeReasonUnmarshaller();
     }
     return(instance);
 }