public Task FlushAsync(TimeSpan timeout)
        {
            var tcs = new TaskCompletionSource <object>();

            NLogManager.Flush(
                e =>
            {
                if (e != null)
                {
                    tcs.TrySetException(e);
                }
                else
                {
                    tcs.TrySetResult(null);
                }
            },
                timeout);
            return(tcs.Task);
        }
 public void Flush()
 {
     NLogManager.Flush();
 }
 public void Flush(TimeSpan timeout)
 {
     NLogManager.Flush(timeout);
 }