Ejemplo n.º 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);
        }
Ejemplo n.º 2
0
 public static InstanceGroupTimelineUnmarshaller GetInstance()
 {
     if (instance == null)
     {
         instance = new InstanceGroupTimelineUnmarshaller();
     }
     return(instance);
 }