using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Quadarax.Foundation.Common.Reflection;
using Quadarax.Foundation.QConsole.Command.Base;
using Quadarax.Foundation.QConsole.Extensions;

namespace Quadarax.Foundation.QConsole.DevBench.Command
{
    public class Entry : ISelectionEntry
    {
        public string Name { get; }
        public string Value { get; }

        public Entry(string name, string value)
        {
            Name = name;
            Value = value;
        }

        public string GetIdentifier()
        {
            return Name;
        }

        public string GetDisplayValue()
        {
            return Value;
        }

        public object GetPropertyValue(string propertyName)
        {
            return GetType().GetPropertyValue(propertyName, this);
        }

        public string GetPropertyValueAsString(string propertyName)
        {
            return GetType().GetPropertyValueAsString(propertyName, this);
        }
    }
}
