internal MessageLog(TaskLog taskLog, string message, Output output)
            : this(taskLog, message)
        {
            if (output == null)
            {
                throw new ArgumentNullException(nameof(output));
            }

            output.Message("{0}: {1}", taskLog.Name, message);
        }
        private MessageLog(TaskLog taskLog, string message)
            : base(measureExecutionTime: false)
        {
            if (taskLog == null)
            {
                throw new ArgumentNullException(nameof(taskLog));
            }

            TaskLog = taskLog;
            Message = message;
        }
        internal StepLog(TaskLog taskLog, IStep step, Output output)
        {
            if (taskLog == null)
            {
                throw new ArgumentNullException(nameof(taskLog));
            }
            if (step == null)
            {
                throw new ArgumentNullException(nameof(step));
            }
            if (output == null)
            {
                throw new ArgumentNullException(nameof(output));
            }

            _output   = output;
            _messages = new List <MessageLog>();

            TaskLog = taskLog;
            Name    = step.Name();

            TaskLog.Persist(this);
            _output.Message(Name);
        }
        public override void Dispose()
        {
            base.Dispose();

            TaskLog.Persist(this);
        }