using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;

namespace Test
{
    public class ResultsItem
    {
        /// <summary>
        /// THe result could be OK or Failed
        /// </summary>
        public string Value { get; set; }
    }

    public class HistoryViewModel: BaseViewModel
    {
        public HistoryViewModel()
        {
            InitResultsItem();
        }

        public ObservableCollection<ResultsItem> ResultsItems { get; set; }
        private void InitResultsItem()
        {
            ResultsItems = new ObservableCollection<ResultsItem>()

            {
              new ResultsItem { Value = "OK" },
              new ResultsItem { Value = "Failed" },
             };

            //SelectedResultItem = ResultsItems[0];
        }
    }

    public class BaseViewModel : INotifyPropertyChanged
    {

        #region INotifyPropertychanged Implementation

        public event PropertyChangedEventHandler PropertyChanged;

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

        #endregion
    }
}
