예제 #1
0
        public Clip Unmarshall(JsonUnmarshallerContext context)
        {
            if (context.CurrentTokenType == JsonToken.Null)
            {
                return(null);
            }

            Clip clip = new Clip();



            int originalDepth = context.CurrentDepth;
            int targetDepth   = originalDepth + 1;

            while (context.Read())
            {
                if (context.TestExpression("TimeSpan", targetDepth))
                {
                    context.Read();
                    clip.TimeSpan = TimeSpanUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.CurrentDepth <= originalDepth)
                {
                    return(clip);
                }
            }


            return(clip);
        }
예제 #2
0
 public static TimeSpanUnmarshaller GetInstance()
 {
     if (instance == null)
     {
         instance = new TimeSpanUnmarshaller();
     }
     return(instance);
 }