using System;
using Windows.UI.Xaml.Data;

namespace PCUT.Converters
{
    internal class LogTimestampConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, string language)
        {
            switch (value)
            {
                case DateTime timeValue:
                    {
                        return $"[{timeValue.ToString("yyyy-MM-dd HH:mm:ss.fff K")}]";
                    }
                default:
                    return string.Empty;
            }
        }

        public object ConvertBack(object value, Type targetType, object parameter, string language)
        {
            throw new NotImplementedException();
        }
    }
}
