示例#1
0
        /// <summary>
        /// Disposes the managed and unmanaged data of the <see cref="VoidLogger"/>.
        /// </summary>
        /// <param name="disposing"> Whether the global log should be disposed. </param>
        private void Dispose(bool disposing)
        {
            if (!(Disposed || Disposing))
            {
                Disposing = true;
                Log.RemoveLogger();

                if (updThread != null)
                {
                    updThread.Dispose();
                }

                Disposing = false;
                Disposed  = true;
            }
        }
示例#2
0
        /// <summary>
        /// Disposes the managed and unmanaged data of the <see cref="ConsoleLogger"/>.
        /// </summary>
        /// <param name="disposing"> Whether the global log should be disposed. </param>
        protected virtual void Dispose(bool disposing)
        {
            if (!(Disposed || Disposing))
            {
                Disposing = true;
                Log.RemoveLogger();

                if (hndlr != null)
                {
                    RemoveConsoleHandle(hndlr);
                    hndlr -= OnConsoleExit;
                }
                if (updThread != null)
                {
                    updThread.Dispose();
                }

                Disposing = false;
                Disposed  = true;
            }
        }