public int Peek() { // Per MSDN documentation on StreamReader.Peek(), it's perfectly acceptable to cast // int returned by Peek() to char. unchecked { while (Char.IsWhiteSpace((char) StreamPeek())) { streamReader.Read(); } } return StreamPeek(); }
public List <I> Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) { return(new List <I>()); } List <I> list = new AlwaysSendList <I>(); while (!context.Peek(JsonToken.ArrayEnd)) { list.Add(iUnmarshaller.Unmarshall(context)); } context.Read(); return(list); }