コード例 #1
0
ファイル: AtomWriter.cs プロジェクト: siteserver/sscms.form
        /// <summary>
        /// Writes the Atom entry body.
        /// </summary>
        private void WriteEntry(AtomEntry entry)
        {
            if (this._writer == null)
            {
                throw new InvalidOperationException("AtomWriter has been closed, and can not be written to.");
            }

            if (entry == null)
            {
                throw new RequiredElementNotFoundException("AtomEntry cannot be null.");
            }

            this._writer.WriteRaw(entry.ToString());

            this._writer.Flush();
            this._writer.Close();
            this._writer = null;
        }