public void TimeStampFormat()
        {
            var format = new TimeStampFormat();

            format.ForegroundColor.Should().Be(ToMediaColor(_settings.TimeStampColor));
            format.BackgroundOpacity.Should().Be(0);
        }
示例#2
0
        /// <summary>
        /// Initializes a new instance of <see cref="TraceLogger"/>.
        /// </summary>
        /// <param name="writeCallback">Callback to TraceListener write function. Value can be null.</param>
        /// <param name="flushCallback">Callback to TraceListener flush function. Value can be null.</param>
        public TraceLogger(TraceLoggerWrite writeCallback, TraceLoggerFlush flushCallback)
        {
            Enabled       = true;
            ShowTimeStamp = false;
            OnWrite       = writeCallback ?? DummyWrite;
            OnFlush       = flushCallback ?? DummyFlush;
            IsNewLine     = true;

            DateTimeFormatInfo timeFormat = CultureInfo.CurrentCulture.DateTimeFormat;

            TimeStampFormat = timeFormat.ShortDatePattern + " " + timeFormat.LongTimePattern;
            TimeStampFormat = TimeStampFormat.Replace("ss", "ss.fff"); //Include miliseconds
        }
 public EventsFormatterData(IEventListener<FormatChanged> formatChangedListener)
 {
     _formatChangedListener = formatChangedListener;
     _timeFormat = TimeStampFormat.Absolute;
     HiddenMessages = new List<string>();
 }
 public void TimeStampFormat()
 {
     var format = new TimeStampFormat();
     format.ForegroundColor.Should().Be(ToMediaColor(_settings.TimeStampColor));
     format.BackgroundOpacity.Should().Be(0);
 }
示例#5
0
 public EventsFormatterData(IEventListener <FormatChanged> formatChangedListener)
 {
     _formatChangedListener = formatChangedListener;
     _timeFormat            = TimeStampFormat.Absolute;
     HiddenMessages         = new List <string>();
 }