private bool DetermineResult(Stopwatch sw)
        {
            if (!_logMessageSink.HasErrors && !_logMessageSink.HasWarnings)
            {
                _logMessageSink.Message($"Generation was done successfully({sw.Elapsed.Seconds}s)...");
                return(true);
            }

            if (_logMessageSink.HasErrors)
            {
                _logMessageSink.Error($"Generation was finished with errors({sw.Elapsed.Seconds}s)...");
                return(false);
            }

            if (_logMessageSink.HasWarnings)
            {
                _logMessageSink.Warning($"Generation was finished with warnings({sw.Elapsed.Seconds}s)...");
            }

            return(true);
        }
        public void Flush()
        {
            List <LogMessage> messages = this.messages;

            this.messages = new List <LogMessage>();
            messages.ForEach(l =>
            {
                if (l is ErrorMessage)
                {
                    _logMessageSink.Error(l.Message);
                    return;
                }

                if (l is WarningMessage)
                {
                    _logMessageSink.Warning(l.Message);
                    return;
                }

                _logMessageSink.Message(l.Message);
            });
            messages.Clear();
        }