24 lines
481 B
C#
24 lines
481 B
C#
|
using Newtonsoft.Json.Linq;
|
||
|
|
||
|
namespace tlang
|
||
|
{
|
||
|
public class TBoolean : TObject
|
||
|
{
|
||
|
public override JToken AsToken()
|
||
|
{
|
||
|
return JValue.FromObject(Value);
|
||
|
}
|
||
|
public bool Value {get;set;}
|
||
|
|
||
|
public override bool AsBoolean => Value;
|
||
|
|
||
|
public TBoolean(bool value)
|
||
|
{
|
||
|
Value = value;
|
||
|
}
|
||
|
public override string ToString()
|
||
|
{
|
||
|
return Value ? "true" : "false";
|
||
|
}
|
||
|
}
|
||
|
}
|