NLog.Config.LoggingConfiguration.Close C# (CSharp) Method

Close() private method

Closes all targets and releases any unmanaged resources.
private Close ( ) : void
return void
        internal void Close()
        {
            InternalLogger.Debug("Closing logging configuration...");
            foreach (ISupportsInitialize initialize in this.configItems.OfType<ISupportsInitialize>())
            {
                InternalLogger.Trace("Closing {0}", initialize);
                try
                {
                    initialize.Close();
                }
                catch (Exception exception)
                {
                    if (exception.MustBeRethrown())
                    {
                        throw;
                    }

                    InternalLogger.Warn("Exception while closing {0}", exception);
                }
            }

            InternalLogger.Debug("Finished closing logging configuration.");
        }