using System;
using System.Collections.Generic;
using System.Text;
using System.Diagnostics;

namespace TERASOLUNA.Fw.CommonUT.Logging.TraceSourceLog
{
    /// <summary>
    /// TraceSourceLogger 単体試験用の TraceListener 拡張クラスです。
    /// </summary>
    /// <remarks>
    /// TraceListener の TraceEvent(TraceEventCache, string, TraceEventType, int, string) を
    /// 拡張しており、引数に与えられた値をフィールドとして保持します。
    /// </remarks>
    public class TraceSourceLogger_TraceListenerStub01 : TraceListener
    {
        public TraceEventCache _eventCache;
        public string _source;
        public TraceEventType _eventType;
        public int _id;
        public string _message = null;
        public bool _flag = false;

        public override void TraceEvent(TraceEventCache eventCache, string source, TraceEventType eventType, int id, string message)
        {
            _flag = true;
            _eventCache = eventCache;
            _source = source;
            _eventType = eventType;
            _id = id;
            _message = message;
        }

        public override void WriteLine(string message)
        { }

        public override void Write(string message)
        { }
    }
}
