コード例 #1
0
        /// <summary>
        /// Closes the context.
        /// </summary>
        /// <param name="obj">The object.</param>
        /// <exception cref="System.InvalidOperationException">
        /// There is no current context.</exception>
        private void CloseContext(Json.JsonObject obj)
        {
            if (this.context == null)
            {
                throw new InvalidOperationException("There is no current context.");
            }

            this.context    = null;
            this.JsonObject = obj;
        }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="JsonDecoder"/> class.
 /// </summary>
 /// <param name="json">The JSON object to decoder.</param>
 /// <param name="str">The string representation of the object.</param>
 private JsonDecoder(Json.JsonObject json, string str)
 {
     this.JsonObject = json;
     this.JsonString = str;
 }
コード例 #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Context"/> class.
 /// </summary>
 /// <param name="parentEncoder">The parent.</param>
 public Context(JsonEncoder parentEncoder)
 {
     this.parent = parentEncoder;
     this.obj    = new Json.JsonObject();
 }