NLog.Targets.FileTarget.FlushAsync C# (CSharp) Method

FlushAsync() protected method

Flushes all pending file operations.
The timeout parameter is ignored, because file APIs don't provide the needed functionality.
protected FlushAsync ( AsyncContinuation asyncContinuation ) : void
asyncContinuation AsyncContinuation The asynchronous continuation.
return void
        protected override void FlushAsync(AsyncContinuation asyncContinuation)
        {
            try
            {
                fileAppenderCache.FlushAppenders();
                asyncContinuation(null);
            }
            catch (Exception exception)
            {
                if (exception.MustBeRethrown())
                {
                    throw;
                }

                asyncContinuation(exception);
            }
        }