示例#1
0
        /// <summary>
        /// Closes this stream and the underlying stream.
        /// </summary>
        public override void Close()
        {
            base.Close();

            if (CloseOutput && _writer != null)
            {
                _writer.Close();
            }
        }
示例#2
0
        /// <summary>
        ///     Closes this writer.
        ///     If <see cref="JsonWriter.CloseOutput" /> is set to <c>true</c>, the underlying <see cref="Stream" /> is also
        ///     closed.
        ///     If <see cref="JsonWriter.AutoCompleteOnClose" /> is set to <c>true</c>, the JSON is auto-completed.
        /// </summary>
        public override void Close()
        {
            base.Close();

            if (CloseOutput)
            {
                _writer?.Close();
            }
        }