using System;
using System.ComponentModel;
using System.Runtime.CompilerServices;

namespace SWRIS.Models
{
    public class DebugMessageModel : INotifyPropertyChanged
    {
        private DateTime _dateTime = DateTime.Now;
        private string _message;

        public DebugMessageModel(string message, DateTime dateTime)
        {
            _message = message;
            _dateTime = dateTime;
        }
        public DebugMessageModel(string message)
        {
            _message = message;
        }
        public DateTime DateTime
        {
            get => _dateTime;
            set { _dateTime = value; OnPropertyChanged(); }
        }
        public string Message
        {
            get => _message;
            set { _message = value; OnPropertyChanged(); }
        }

        public event PropertyChangedEventHandler PropertyChanged;

        protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
        {
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
        }
    }
}
