コード例 #1
0
ファイル: Logger.cs プロジェクト: penguincms/Penguin.Logging
        /// <summary>
        /// Disposes of this logger and persists messages to the underlying database for IRepository implementations
        /// </summary>
        /// <param name="disposing">unused</param>
        protected virtual void Dispose(bool disposing)
        {
            if (!this.disposedValue)
            {
                this.LogEntryRepository.AddOrUpdate(this.Entries.ToArray());

                this.LogEntryRepository.Commit(WriteContext);

                this.disposedValue = true;
            }

            WriteContext.Dispose();
        }