Пример #1
0
        private void TaskForm_FormClosing(object sender, FormClosingEventArgs e)
        {
            if (!task.IsCompleted)
            {
                if (!cancellationTokenSource.IsCancellationRequested)
                {
                    Cancel();
                }
                e.Cancel = true;
                return;
            }

            appender.Close();
            ((Hierarchy)log4net.LogManager.GetRepository()).Root.RemoveAppender(appender);
        }
Пример #2
0
 private void CloseAppender(log4net.Appender.IAppender appender)
 {
     appender.Close();
 }