Ejemplo n.º 1
0
        /// <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();
        }