///<summary> /// TJSONProtocol Constructor ///</summary> public TJSONProtocol(TTransport trans) : base(trans) { context = new JSONBaseContext(this); reader = new LookaheadReader(this); }
///<summary> /// Push a new JSON context onto the stack. ///</summary> protected void PushContext(JSONBaseContext c) { contextStack.Push(context); context = c; }
///<summary> /// Pop the last JSON context off the stack ///</summary> protected void PopContext() { context = contextStack.Pop(); }
/// <summary> /// Pop the last JSON context off the stack /// </summary> protected void PopContext() { context = contextStack.Pop(); }
/// <summary> /// TJsonProtocol Constructor /// </summary> public TJsonProtocol(TTransport trans) : base(trans) { Context = new JSONBaseContext(this); Reader = new LookaheadReader(this); }
/// <summary> /// Push a new JSON context onto the stack. /// </summary> protected void PushContext(JSONBaseContext c) { contextStack.Push(context); context = c; }
/// <summary> /// Push a new JSON context onto the stack. /// </summary> protected void PushContext(JSONBaseContext c) { ContextStack.Push(Context); Context = c; }
///<summary> /// JSONProtocol Constructor ///</summary> public JSONSerializer(System.IO.Stream stream) : base(stream) { context = new JSONBaseContext(this); reader = new LookaheadReader(this); }
/// <summary> /// Resets the context stack to pristine state. Allows for reusal of the protocol /// even in cases where the protocol instance was in an undefined state due to /// dangling/stale/obsolete contexts /// </summary> private void resetContext() { ContextStack.Clear(); Context = new JSONBaseContext(this); }