namespace Quadarax.Foundation.Core.QConsole.Value
{
    public class BoolValue : AbstractValue
    {
        public BoolValue() : base()
        {

        }
        public BoolValue(bool value) : base(typeof(bool), value)
        {
        }

        protected override object ConvertStringToValue(string valueAsString)
        {
            return bool.Parse(valueAsString);
        }

        public override string AsString()
        {
            return HasValue ? Get().ToString() : string.Empty;
        }
    }
}
