Amazon.Runtime.Internal.Transform.JsonUnmarshallerContext.Peek C# (CSharp) Method

Peek() public method

Peeks at the next (non-whitespace) character in the jsonStream.
public Peek ( ) : int
return int
        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();

        }

Same methods

JsonUnmarshallerContext::Peek ( JsonToken token ) : bool

Usage Example

Example #1
0
        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);
        }
All Usage Examples Of Amazon.Runtime.Internal.Transform.JsonUnmarshallerContext::Peek