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); }
public static TimeSpanUnmarshaller GetInstance() { if (instance == null) { instance = new TimeSpanUnmarshaller(); } return(instance); }